protoc files
Browse files- .gitattributes +1 -0
- protoc/bin/protoc.exe +3 -0
- protoc/include/google/protobuf/any.proto +158 -0
- protoc/include/google/protobuf/api.proto +208 -0
- protoc/include/google/protobuf/compiler/plugin.proto +183 -0
- protoc/include/google/protobuf/descriptor.proto +909 -0
- protoc/include/google/protobuf/duration.proto +116 -0
- protoc/include/google/protobuf/empty.proto +52 -0
- protoc/include/google/protobuf/field_mask.proto +245 -0
- protoc/include/google/protobuf/source_context.proto +48 -0
- protoc/include/google/protobuf/struct.proto +95 -0
- protoc/include/google/protobuf/timestamp.proto +147 -0
- protoc/include/google/protobuf/type.proto +187 -0
- protoc/include/google/protobuf/wrappers.proto +123 -0
- protoc/protoc-3.15.6-win64.zip +3 -0
- protoc/readme.txt +15 -0
.gitattributes
CHANGED
@@ -41,3 +41,4 @@ ckpt-5.data-00000-of-00001 filter=lfs diff=lfs merge=lfs -text
|
|
41 |
ckpt-6.data-00000-of-00001 filter=lfs diff=lfs merge=lfs -text
|
42 |
ckpt-7.data-00000-of-00001 filter=lfs diff=lfs merge=lfs -text
|
43 |
ckpt-8.data-00000-of-00001 filter=lfs diff=lfs merge=lfs -text
|
|
|
|
41 |
ckpt-6.data-00000-of-00001 filter=lfs diff=lfs merge=lfs -text
|
42 |
ckpt-7.data-00000-of-00001 filter=lfs diff=lfs merge=lfs -text
|
43 |
ckpt-8.data-00000-of-00001 filter=lfs diff=lfs merge=lfs -text
|
44 |
+
protoc/bin/protoc.exe filter=lfs diff=lfs merge=lfs -text
|
protoc/bin/protoc.exe
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2b8df66a150ac25963e9e64c70748ba094a254ffb0f8f63caacb5a937027070a
|
3 |
+
size 3732480
|
protoc/include/google/protobuf/any.proto
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
36 |
+
option go_package = "google.golang.org/protobuf/types/known/anypb";
|
37 |
+
option java_package = "com.google.protobuf";
|
38 |
+
option java_outer_classname = "AnyProto";
|
39 |
+
option java_multiple_files = true;
|
40 |
+
option objc_class_prefix = "GPB";
|
41 |
+
|
42 |
+
// `Any` contains an arbitrary serialized protocol buffer message along with a
|
43 |
+
// URL that describes the type of the serialized message.
|
44 |
+
//
|
45 |
+
// Protobuf library provides support to pack/unpack Any values in the form
|
46 |
+
// of utility functions or additional generated methods of the Any type.
|
47 |
+
//
|
48 |
+
// Example 1: Pack and unpack a message in C++.
|
49 |
+
//
|
50 |
+
// Foo foo = ...;
|
51 |
+
// Any any;
|
52 |
+
// any.PackFrom(foo);
|
53 |
+
// ...
|
54 |
+
// if (any.UnpackTo(&foo)) {
|
55 |
+
// ...
|
56 |
+
// }
|
57 |
+
//
|
58 |
+
// Example 2: Pack and unpack a message in Java.
|
59 |
+
//
|
60 |
+
// Foo foo = ...;
|
61 |
+
// Any any = Any.pack(foo);
|
62 |
+
// ...
|
63 |
+
// if (any.is(Foo.class)) {
|
64 |
+
// foo = any.unpack(Foo.class);
|
65 |
+
// }
|
66 |
+
//
|
67 |
+
// Example 3: Pack and unpack a message in Python.
|
68 |
+
//
|
69 |
+
// foo = Foo(...)
|
70 |
+
// any = Any()
|
71 |
+
// any.Pack(foo)
|
72 |
+
// ...
|
73 |
+
// if any.Is(Foo.DESCRIPTOR):
|
74 |
+
// any.Unpack(foo)
|
75 |
+
// ...
|
76 |
+
//
|
77 |
+
// Example 4: Pack and unpack a message in Go
|
78 |
+
//
|
79 |
+
// foo := &pb.Foo{...}
|
80 |
+
// any, err := anypb.New(foo)
|
81 |
+
// if err != nil {
|
82 |
+
// ...
|
83 |
+
// }
|
84 |
+
// ...
|
85 |
+
// foo := &pb.Foo{}
|
86 |
+
// if err := any.UnmarshalTo(foo); err != nil {
|
87 |
+
// ...
|
88 |
+
// }
|
89 |
+
//
|
90 |
+
// The pack methods provided by protobuf library will by default use
|
91 |
+
// 'type.googleapis.com/full.type.name' as the type URL and the unpack
|
92 |
+
// methods only use the fully qualified type name after the last '/'
|
93 |
+
// in the type URL, for example "foo.bar.com/x/y.z" will yield type
|
94 |
+
// name "y.z".
|
95 |
+
//
|
96 |
+
//
|
97 |
+
// JSON
|
98 |
+
// ====
|
99 |
+
// The JSON representation of an `Any` value uses the regular
|
100 |
+
// representation of the deserialized, embedded message, with an
|
101 |
+
// additional field `@type` which contains the type URL. Example:
|
102 |
+
//
|
103 |
+
// package google.profile;
|
104 |
+
// message Person {
|
105 |
+
// string first_name = 1;
|
106 |
+
// string last_name = 2;
|
107 |
+
// }
|
108 |
+
//
|
109 |
+
// {
|
110 |
+
// "@type": "type.googleapis.com/google.profile.Person",
|
111 |
+
// "firstName": <string>,
|
112 |
+
// "lastName": <string>
|
113 |
+
// }
|
114 |
+
//
|
115 |
+
// If the embedded message type is well-known and has a custom JSON
|
116 |
+
// representation, that representation will be embedded adding a field
|
117 |
+
// `value` which holds the custom JSON in addition to the `@type`
|
118 |
+
// field. Example (for message [google.protobuf.Duration][]):
|
119 |
+
//
|
120 |
+
// {
|
121 |
+
// "@type": "type.googleapis.com/google.protobuf.Duration",
|
122 |
+
// "value": "1.212s"
|
123 |
+
// }
|
124 |
+
//
|
125 |
+
message Any {
|
126 |
+
// A URL/resource name that uniquely identifies the type of the serialized
|
127 |
+
// protocol buffer message. This string must contain at least
|
128 |
+
// one "/" character. The last segment of the URL's path must represent
|
129 |
+
// the fully qualified name of the type (as in
|
130 |
+
// `path/google.protobuf.Duration`). The name should be in a canonical form
|
131 |
+
// (e.g., leading "." is not accepted).
|
132 |
+
//
|
133 |
+
// In practice, teams usually precompile into the binary all types that they
|
134 |
+
// expect it to use in the context of Any. However, for URLs which use the
|
135 |
+
// scheme `http`, `https`, or no scheme, one can optionally set up a type
|
136 |
+
// server that maps type URLs to message definitions as follows:
|
137 |
+
//
|
138 |
+
// * If no scheme is provided, `https` is assumed.
|
139 |
+
// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
|
140 |
+
// value in binary format, or produce an error.
|
141 |
+
// * Applications are allowed to cache lookup results based on the
|
142 |
+
// URL, or have them precompiled into a binary to avoid any
|
143 |
+
// lookup. Therefore, binary compatibility needs to be preserved
|
144 |
+
// on changes to types. (Use versioned type names to manage
|
145 |
+
// breaking changes.)
|
146 |
+
//
|
147 |
+
// Note: this functionality is not currently available in the official
|
148 |
+
// protobuf release, and it is not used for type URLs beginning with
|
149 |
+
// type.googleapis.com.
|
150 |
+
//
|
151 |
+
// Schemes other than `http`, `https` (or the empty scheme) might be
|
152 |
+
// used with implementation specific semantics.
|
153 |
+
//
|
154 |
+
string type_url = 1;
|
155 |
+
|
156 |
+
// Must be a valid serialized protocol buffer of the above specified type.
|
157 |
+
bytes value = 2;
|
158 |
+
}
|
protoc/include/google/protobuf/api.proto
ADDED
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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/source_context.proto";
|
36 |
+
import "google/protobuf/type.proto";
|
37 |
+
|
38 |
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
39 |
+
option java_package = "com.google.protobuf";
|
40 |
+
option java_outer_classname = "ApiProto";
|
41 |
+
option java_multiple_files = true;
|
42 |
+
option objc_class_prefix = "GPB";
|
43 |
+
option go_package = "google.golang.org/protobuf/types/known/apipb";
|
44 |
+
|
45 |
+
// Api is a light-weight descriptor for an API Interface.
|
46 |
+
//
|
47 |
+
// Interfaces are also described as "protocol buffer services" in some contexts,
|
48 |
+
// such as by the "service" keyword in a .proto file, but they are different
|
49 |
+
// from API Services, which represent a concrete implementation of an interface
|
50 |
+
// as opposed to simply a description of methods and bindings. They are also
|
51 |
+
// sometimes simply referred to as "APIs" in other contexts, such as the name of
|
52 |
+
// this message itself. See https://cloud.google.com/apis/design/glossary for
|
53 |
+
// detailed terminology.
|
54 |
+
message Api {
|
55 |
+
// The fully qualified name of this interface, including package name
|
56 |
+
// followed by the interface's simple name.
|
57 |
+
string name = 1;
|
58 |
+
|
59 |
+
// The methods of this interface, in unspecified order.
|
60 |
+
repeated Method methods = 2;
|
61 |
+
|
62 |
+
// Any metadata attached to the interface.
|
63 |
+
repeated Option options = 3;
|
64 |
+
|
65 |
+
// A version string for this interface. If specified, must have the form
|
66 |
+
// `major-version.minor-version`, as in `1.10`. If the minor version is
|
67 |
+
// omitted, it defaults to zero. If the entire version field is empty, the
|
68 |
+
// major version is derived from the package name, as outlined below. If the
|
69 |
+
// field is not empty, the version in the package name will be verified to be
|
70 |
+
// consistent with what is provided here.
|
71 |
+
//
|
72 |
+
// The versioning schema uses [semantic
|
73 |
+
// versioning](http://semver.org) where the major version number
|
74 |
+
// indicates a breaking change and the minor version an additive,
|
75 |
+
// non-breaking change. Both version numbers are signals to users
|
76 |
+
// what to expect from different versions, and should be carefully
|
77 |
+
// chosen based on the product plan.
|
78 |
+
//
|
79 |
+
// The major version is also reflected in the package name of the
|
80 |
+
// interface, which must end in `v<major-version>`, as in
|
81 |
+
// `google.feature.v1`. For major versions 0 and 1, the suffix can
|
82 |
+
// be omitted. Zero major versions must only be used for
|
83 |
+
// experimental, non-GA interfaces.
|
84 |
+
//
|
85 |
+
//
|
86 |
+
string version = 4;
|
87 |
+
|
88 |
+
// Source context for the protocol buffer service represented by this
|
89 |
+
// message.
|
90 |
+
SourceContext source_context = 5;
|
91 |
+
|
92 |
+
// Included interfaces. See [Mixin][].
|
93 |
+
repeated Mixin mixins = 6;
|
94 |
+
|
95 |
+
// The source syntax of the service.
|
96 |
+
Syntax syntax = 7;
|
97 |
+
}
|
98 |
+
|
99 |
+
// Method represents a method of an API interface.
|
100 |
+
message Method {
|
101 |
+
// The simple name of this method.
|
102 |
+
string name = 1;
|
103 |
+
|
104 |
+
// A URL of the input message type.
|
105 |
+
string request_type_url = 2;
|
106 |
+
|
107 |
+
// If true, the request is streamed.
|
108 |
+
bool request_streaming = 3;
|
109 |
+
|
110 |
+
// The URL of the output message type.
|
111 |
+
string response_type_url = 4;
|
112 |
+
|
113 |
+
// If true, the response is streamed.
|
114 |
+
bool response_streaming = 5;
|
115 |
+
|
116 |
+
// Any metadata attached to the method.
|
117 |
+
repeated Option options = 6;
|
118 |
+
|
119 |
+
// The source syntax of this method.
|
120 |
+
Syntax syntax = 7;
|
121 |
+
}
|
122 |
+
|
123 |
+
// Declares an API Interface to be included in this interface. The including
|
124 |
+
// interface must redeclare all the methods from the included interface, but
|
125 |
+
// documentation and options are inherited as follows:
|
126 |
+
//
|
127 |
+
// - If after comment and whitespace stripping, the documentation
|
128 |
+
// string of the redeclared method is empty, it will be inherited
|
129 |
+
// from the original method.
|
130 |
+
//
|
131 |
+
// - Each annotation belonging to the service config (http,
|
132 |
+
// visibility) which is not set in the redeclared method will be
|
133 |
+
// inherited.
|
134 |
+
//
|
135 |
+
// - If an http annotation is inherited, the path pattern will be
|
136 |
+
// modified as follows. Any version prefix will be replaced by the
|
137 |
+
// version of the including interface plus the [root][] path if
|
138 |
+
// specified.
|
139 |
+
//
|
140 |
+
// Example of a simple mixin:
|
141 |
+
//
|
142 |
+
// package google.acl.v1;
|
143 |
+
// service AccessControl {
|
144 |
+
// // Get the underlying ACL object.
|
145 |
+
// rpc GetAcl(GetAclRequest) returns (Acl) {
|
146 |
+
// option (google.api.http).get = "/v1/{resource=**}:getAcl";
|
147 |
+
// }
|
148 |
+
// }
|
149 |
+
//
|
150 |
+
// package google.storage.v2;
|
151 |
+
// service Storage {
|
152 |
+
// rpc GetAcl(GetAclRequest) returns (Acl);
|
153 |
+
//
|
154 |
+
// // Get a data record.
|
155 |
+
// rpc GetData(GetDataRequest) returns (Data) {
|
156 |
+
// option (google.api.http).get = "/v2/{resource=**}";
|
157 |
+
// }
|
158 |
+
// }
|
159 |
+
//
|
160 |
+
// Example of a mixin configuration:
|
161 |
+
//
|
162 |
+
// apis:
|
163 |
+
// - name: google.storage.v2.Storage
|
164 |
+
// mixins:
|
165 |
+
// - name: google.acl.v1.AccessControl
|
166 |
+
//
|
167 |
+
// The mixin construct implies that all methods in `AccessControl` are
|
168 |
+
// also declared with same name and request/response types in
|
169 |
+
// `Storage`. A documentation generator or annotation processor will
|
170 |
+
// see the effective `Storage.GetAcl` method after inheriting
|
171 |
+
// documentation and annotations as follows:
|
172 |
+
//
|
173 |
+
// service Storage {
|
174 |
+
// // Get the underlying ACL object.
|
175 |
+
// rpc GetAcl(GetAclRequest) returns (Acl) {
|
176 |
+
// option (google.api.http).get = "/v2/{resource=**}:getAcl";
|
177 |
+
// }
|
178 |
+
// ...
|
179 |
+
// }
|
180 |
+
//
|
181 |
+
// Note how the version in the path pattern changed from `v1` to `v2`.
|
182 |
+
//
|
183 |
+
// If the `root` field in the mixin is specified, it should be a
|
184 |
+
// relative path under which inherited HTTP paths are placed. Example:
|
185 |
+
//
|
186 |
+
// apis:
|
187 |
+
// - name: google.storage.v2.Storage
|
188 |
+
// mixins:
|
189 |
+
// - name: google.acl.v1.AccessControl
|
190 |
+
// root: acls
|
191 |
+
//
|
192 |
+
// This implies the following inherited HTTP annotation:
|
193 |
+
//
|
194 |
+
// service Storage {
|
195 |
+
// // Get the underlying ACL object.
|
196 |
+
// rpc GetAcl(GetAclRequest) returns (Acl) {
|
197 |
+
// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
|
198 |
+
// }
|
199 |
+
// ...
|
200 |
+
// }
|
201 |
+
message Mixin {
|
202 |
+
// The fully qualified name of the interface which is included.
|
203 |
+
string name = 1;
|
204 |
+
|
205 |
+
// If non-empty specifies a path under which inherited HTTP paths
|
206 |
+
// are rooted.
|
207 |
+
string root = 2;
|
208 |
+
}
|
protoc/include/google/protobuf/compiler/plugin.proto
ADDED
@@ -0,0 +1,183 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
// Author: kenton@google.com (Kenton Varda)
|
32 |
+
//
|
33 |
+
// WARNING: The plugin interface is currently EXPERIMENTAL and is subject to
|
34 |
+
// change.
|
35 |
+
//
|
36 |
+
// protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
|
37 |
+
// just a program that reads a CodeGeneratorRequest from stdin and writes a
|
38 |
+
// CodeGeneratorResponse to stdout.
|
39 |
+
//
|
40 |
+
// Plugins written using C++ can use google/protobuf/compiler/plugin.h instead
|
41 |
+
// of dealing with the raw protocol defined here.
|
42 |
+
//
|
43 |
+
// A plugin executable needs only to be placed somewhere in the path. The
|
44 |
+
// plugin should be named "protoc-gen-$NAME", and will then be used when the
|
45 |
+
// flag "--${NAME}_out" is passed to protoc.
|
46 |
+
|
47 |
+
syntax = "proto2";
|
48 |
+
|
49 |
+
package google.protobuf.compiler;
|
50 |
+
option java_package = "com.google.protobuf.compiler";
|
51 |
+
option java_outer_classname = "PluginProtos";
|
52 |
+
|
53 |
+
option go_package = "google.golang.org/protobuf/types/pluginpb";
|
54 |
+
|
55 |
+
import "google/protobuf/descriptor.proto";
|
56 |
+
|
57 |
+
// The version number of protocol compiler.
|
58 |
+
message Version {
|
59 |
+
optional int32 major = 1;
|
60 |
+
optional int32 minor = 2;
|
61 |
+
optional int32 patch = 3;
|
62 |
+
// A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
|
63 |
+
// be empty for mainline stable releases.
|
64 |
+
optional string suffix = 4;
|
65 |
+
}
|
66 |
+
|
67 |
+
// An encoded CodeGeneratorRequest is written to the plugin's stdin.
|
68 |
+
message CodeGeneratorRequest {
|
69 |
+
// The .proto files that were explicitly listed on the command-line. The
|
70 |
+
// code generator should generate code only for these files. Each file's
|
71 |
+
// descriptor will be included in proto_file, below.
|
72 |
+
repeated string file_to_generate = 1;
|
73 |
+
|
74 |
+
// The generator parameter passed on the command-line.
|
75 |
+
optional string parameter = 2;
|
76 |
+
|
77 |
+
// FileDescriptorProtos for all files in files_to_generate and everything
|
78 |
+
// they import. The files will appear in topological order, so each file
|
79 |
+
// appears before any file that imports it.
|
80 |
+
//
|
81 |
+
// protoc guarantees that all proto_files will be written after
|
82 |
+
// the fields above, even though this is not technically guaranteed by the
|
83 |
+
// protobuf wire format. This theoretically could allow a plugin to stream
|
84 |
+
// in the FileDescriptorProtos and handle them one by one rather than read
|
85 |
+
// the entire set into memory at once. However, as of this writing, this
|
86 |
+
// is not similarly optimized on protoc's end -- it will store all fields in
|
87 |
+
// memory at once before sending them to the plugin.
|
88 |
+
//
|
89 |
+
// Type names of fields and extensions in the FileDescriptorProto are always
|
90 |
+
// fully qualified.
|
91 |
+
repeated FileDescriptorProto proto_file = 15;
|
92 |
+
|
93 |
+
// The version number of protocol compiler.
|
94 |
+
optional Version compiler_version = 3;
|
95 |
+
|
96 |
+
}
|
97 |
+
|
98 |
+
// The plugin writes an encoded CodeGeneratorResponse to stdout.
|
99 |
+
message CodeGeneratorResponse {
|
100 |
+
// Error message. If non-empty, code generation failed. The plugin process
|
101 |
+
// should exit with status code zero even if it reports an error in this way.
|
102 |
+
//
|
103 |
+
// This should be used to indicate errors in .proto files which prevent the
|
104 |
+
// code generator from generating correct code. Errors which indicate a
|
105 |
+
// problem in protoc itself -- such as the input CodeGeneratorRequest being
|
106 |
+
// unparseable -- should be reported by writing a message to stderr and
|
107 |
+
// exiting with a non-zero status code.
|
108 |
+
optional string error = 1;
|
109 |
+
|
110 |
+
// A bitmask of supported features that the code generator supports.
|
111 |
+
// This is a bitwise "or" of values from the Feature enum.
|
112 |
+
optional uint64 supported_features = 2;
|
113 |
+
|
114 |
+
// Sync with code_generator.h.
|
115 |
+
enum Feature {
|
116 |
+
FEATURE_NONE = 0;
|
117 |
+
FEATURE_PROTO3_OPTIONAL = 1;
|
118 |
+
}
|
119 |
+
|
120 |
+
// Represents a single generated file.
|
121 |
+
message File {
|
122 |
+
// The file name, relative to the output directory. The name must not
|
123 |
+
// contain "." or ".." components and must be relative, not be absolute (so,
|
124 |
+
// the file cannot lie outside the output directory). "/" must be used as
|
125 |
+
// the path separator, not "\".
|
126 |
+
//
|
127 |
+
// If the name is omitted, the content will be appended to the previous
|
128 |
+
// file. This allows the generator to break large files into small chunks,
|
129 |
+
// and allows the generated text to be streamed back to protoc so that large
|
130 |
+
// files need not reside completely in memory at one time. Note that as of
|
131 |
+
// this writing protoc does not optimize for this -- it will read the entire
|
132 |
+
// CodeGeneratorResponse before writing files to disk.
|
133 |
+
optional string name = 1;
|
134 |
+
|
135 |
+
// If non-empty, indicates that the named file should already exist, and the
|
136 |
+
// content here is to be inserted into that file at a defined insertion
|
137 |
+
// point. This feature allows a code generator to extend the output
|
138 |
+
// produced by another code generator. The original generator may provide
|
139 |
+
// insertion points by placing special annotations in the file that look
|
140 |
+
// like:
|
141 |
+
// @@protoc_insertion_point(NAME)
|
142 |
+
// The annotation can have arbitrary text before and after it on the line,
|
143 |
+
// which allows it to be placed in a comment. NAME should be replaced with
|
144 |
+
// an identifier naming the point -- this is what other generators will use
|
145 |
+
// as the insertion_point. Code inserted at this point will be placed
|
146 |
+
// immediately above the line containing the insertion point (thus multiple
|
147 |
+
// insertions to the same point will come out in the order they were added).
|
148 |
+
// The double-@ is intended to make it unlikely that the generated code
|
149 |
+
// could contain things that look like insertion points by accident.
|
150 |
+
//
|
151 |
+
// For example, the C++ code generator places the following line in the
|
152 |
+
// .pb.h files that it generates:
|
153 |
+
// // @@protoc_insertion_point(namespace_scope)
|
154 |
+
// This line appears within the scope of the file's package namespace, but
|
155 |
+
// outside of any particular class. Another plugin can then specify the
|
156 |
+
// insertion_point "namespace_scope" to generate additional classes or
|
157 |
+
// other declarations that should be placed in this scope.
|
158 |
+
//
|
159 |
+
// Note that if the line containing the insertion point begins with
|
160 |
+
// whitespace, the same whitespace will be added to every line of the
|
161 |
+
// inserted text. This is useful for languages like Python, where
|
162 |
+
// indentation matters. In these languages, the insertion point comment
|
163 |
+
// should be indented the same amount as any inserted code will need to be
|
164 |
+
// in order to work correctly in that context.
|
165 |
+
//
|
166 |
+
// The code generator that generates the initial file and the one which
|
167 |
+
// inserts into it must both run as part of a single invocation of protoc.
|
168 |
+
// Code generators are executed in the order in which they appear on the
|
169 |
+
// command line.
|
170 |
+
//
|
171 |
+
// If |insertion_point| is present, |name| must also be present.
|
172 |
+
optional string insertion_point = 2;
|
173 |
+
|
174 |
+
// The file contents.
|
175 |
+
optional string content = 15;
|
176 |
+
|
177 |
+
// Information describing the file content being inserted. If an insertion
|
178 |
+
// point is used, this information will be appropriately offset and inserted
|
179 |
+
// into the code generation metadata for the generated files.
|
180 |
+
optional GeneratedCodeInfo generated_code_info = 16;
|
181 |
+
}
|
182 |
+
repeated File file = 15;
|
183 |
+
}
|
protoc/include/google/protobuf/descriptor.proto
ADDED
@@ -0,0 +1,909 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
// Author: kenton@google.com (Kenton Varda)
|
32 |
+
// Based on original Protocol Buffers design by
|
33 |
+
// Sanjay Ghemawat, Jeff Dean, and others.
|
34 |
+
//
|
35 |
+
// The messages in this file describe the definitions found in .proto files.
|
36 |
+
// A valid .proto file can be translated directly to a FileDescriptorProto
|
37 |
+
// without any other information (e.g. without reading its imports).
|
38 |
+
|
39 |
+
|
40 |
+
syntax = "proto2";
|
41 |
+
|
42 |
+
package google.protobuf;
|
43 |
+
|
44 |
+
option go_package = "google.golang.org/protobuf/types/descriptorpb";
|
45 |
+
option java_package = "com.google.protobuf";
|
46 |
+
option java_outer_classname = "DescriptorProtos";
|
47 |
+
option csharp_namespace = "Google.Protobuf.Reflection";
|
48 |
+
option objc_class_prefix = "GPB";
|
49 |
+
option cc_enable_arenas = true;
|
50 |
+
|
51 |
+
// descriptor.proto must be optimized for speed because reflection-based
|
52 |
+
// algorithms don't work during bootstrapping.
|
53 |
+
option optimize_for = SPEED;
|
54 |
+
|
55 |
+
// The protocol compiler can output a FileDescriptorSet containing the .proto
|
56 |
+
// files it parses.
|
57 |
+
message FileDescriptorSet {
|
58 |
+
repeated FileDescriptorProto file = 1;
|
59 |
+
}
|
60 |
+
|
61 |
+
// Describes a complete .proto file.
|
62 |
+
message FileDescriptorProto {
|
63 |
+
optional string name = 1; // file name, relative to root of source tree
|
64 |
+
optional string package = 2; // e.g. "foo", "foo.bar", etc.
|
65 |
+
|
66 |
+
// Names of files imported by this file.
|
67 |
+
repeated string dependency = 3;
|
68 |
+
// Indexes of the public imported files in the dependency list above.
|
69 |
+
repeated int32 public_dependency = 10;
|
70 |
+
// Indexes of the weak imported files in the dependency list.
|
71 |
+
// For Google-internal migration only. Do not use.
|
72 |
+
repeated int32 weak_dependency = 11;
|
73 |
+
|
74 |
+
// All top-level definitions in this file.
|
75 |
+
repeated DescriptorProto message_type = 4;
|
76 |
+
repeated EnumDescriptorProto enum_type = 5;
|
77 |
+
repeated ServiceDescriptorProto service = 6;
|
78 |
+
repeated FieldDescriptorProto extension = 7;
|
79 |
+
|
80 |
+
optional FileOptions options = 8;
|
81 |
+
|
82 |
+
// This field contains optional information about the original source code.
|
83 |
+
// You may safely remove this entire field without harming runtime
|
84 |
+
// functionality of the descriptors -- the information is needed only by
|
85 |
+
// development tools.
|
86 |
+
optional SourceCodeInfo source_code_info = 9;
|
87 |
+
|
88 |
+
// The syntax of the proto file.
|
89 |
+
// The supported values are "proto2" and "proto3".
|
90 |
+
optional string syntax = 12;
|
91 |
+
}
|
92 |
+
|
93 |
+
// Describes a message type.
|
94 |
+
message DescriptorProto {
|
95 |
+
optional string name = 1;
|
96 |
+
|
97 |
+
repeated FieldDescriptorProto field = 2;
|
98 |
+
repeated FieldDescriptorProto extension = 6;
|
99 |
+
|
100 |
+
repeated DescriptorProto nested_type = 3;
|
101 |
+
repeated EnumDescriptorProto enum_type = 4;
|
102 |
+
|
103 |
+
message ExtensionRange {
|
104 |
+
optional int32 start = 1; // Inclusive.
|
105 |
+
optional int32 end = 2; // Exclusive.
|
106 |
+
|
107 |
+
optional ExtensionRangeOptions options = 3;
|
108 |
+
}
|
109 |
+
repeated ExtensionRange extension_range = 5;
|
110 |
+
|
111 |
+
repeated OneofDescriptorProto oneof_decl = 8;
|
112 |
+
|
113 |
+
optional MessageOptions options = 7;
|
114 |
+
|
115 |
+
// Range of reserved tag numbers. Reserved tag numbers may not be used by
|
116 |
+
// fields or extension ranges in the same message. Reserved ranges may
|
117 |
+
// not overlap.
|
118 |
+
message ReservedRange {
|
119 |
+
optional int32 start = 1; // Inclusive.
|
120 |
+
optional int32 end = 2; // Exclusive.
|
121 |
+
}
|
122 |
+
repeated ReservedRange reserved_range = 9;
|
123 |
+
// Reserved field names, which may not be used by fields in the same message.
|
124 |
+
// A given name may only be reserved once.
|
125 |
+
repeated string reserved_name = 10;
|
126 |
+
}
|
127 |
+
|
128 |
+
message ExtensionRangeOptions {
|
129 |
+
// The parser stores options it doesn't recognize here. See above.
|
130 |
+
repeated UninterpretedOption uninterpreted_option = 999;
|
131 |
+
|
132 |
+
|
133 |
+
// Clients can define custom options in extensions of this message. See above.
|
134 |
+
extensions 1000 to max;
|
135 |
+
}
|
136 |
+
|
137 |
+
// Describes a field within a message.
|
138 |
+
message FieldDescriptorProto {
|
139 |
+
enum Type {
|
140 |
+
// 0 is reserved for errors.
|
141 |
+
// Order is weird for historical reasons.
|
142 |
+
TYPE_DOUBLE = 1;
|
143 |
+
TYPE_FLOAT = 2;
|
144 |
+
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
|
145 |
+
// negative values are likely.
|
146 |
+
TYPE_INT64 = 3;
|
147 |
+
TYPE_UINT64 = 4;
|
148 |
+
// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
|
149 |
+
// negative values are likely.
|
150 |
+
TYPE_INT32 = 5;
|
151 |
+
TYPE_FIXED64 = 6;
|
152 |
+
TYPE_FIXED32 = 7;
|
153 |
+
TYPE_BOOL = 8;
|
154 |
+
TYPE_STRING = 9;
|
155 |
+
// Tag-delimited aggregate.
|
156 |
+
// Group type is deprecated and not supported in proto3. However, Proto3
|
157 |
+
// implementations should still be able to parse the group wire format and
|
158 |
+
// treat group fields as unknown fields.
|
159 |
+
TYPE_GROUP = 10;
|
160 |
+
TYPE_MESSAGE = 11; // Length-delimited aggregate.
|
161 |
+
|
162 |
+
// New in version 2.
|
163 |
+
TYPE_BYTES = 12;
|
164 |
+
TYPE_UINT32 = 13;
|
165 |
+
TYPE_ENUM = 14;
|
166 |
+
TYPE_SFIXED32 = 15;
|
167 |
+
TYPE_SFIXED64 = 16;
|
168 |
+
TYPE_SINT32 = 17; // Uses ZigZag encoding.
|
169 |
+
TYPE_SINT64 = 18; // Uses ZigZag encoding.
|
170 |
+
}
|
171 |
+
|
172 |
+
enum Label {
|
173 |
+
// 0 is reserved for errors
|
174 |
+
LABEL_OPTIONAL = 1;
|
175 |
+
LABEL_REQUIRED = 2;
|
176 |
+
LABEL_REPEATED = 3;
|
177 |
+
}
|
178 |
+
|
179 |
+
optional string name = 1;
|
180 |
+
optional int32 number = 3;
|
181 |
+
optional Label label = 4;
|
182 |
+
|
183 |
+
// If type_name is set, this need not be set. If both this and type_name
|
184 |
+
// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
|
185 |
+
optional Type type = 5;
|
186 |
+
|
187 |
+
// For message and enum types, this is the name of the type. If the name
|
188 |
+
// starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
|
189 |
+
// rules are used to find the type (i.e. first the nested types within this
|
190 |
+
// message are searched, then within the parent, on up to the root
|
191 |
+
// namespace).
|
192 |
+
optional string type_name = 6;
|
193 |
+
|
194 |
+
// For extensions, this is the name of the type being extended. It is
|
195 |
+
// resolved in the same manner as type_name.
|
196 |
+
optional string extendee = 2;
|
197 |
+
|
198 |
+
// For numeric types, contains the original text representation of the value.
|
199 |
+
// For booleans, "true" or "false".
|
200 |
+
// For strings, contains the default text contents (not escaped in any way).
|
201 |
+
// For bytes, contains the C escaped value. All bytes >= 128 are escaped.
|
202 |
+
// TODO(kenton): Base-64 encode?
|
203 |
+
optional string default_value = 7;
|
204 |
+
|
205 |
+
// If set, gives the index of a oneof in the containing type's oneof_decl
|
206 |
+
// list. This field is a member of that oneof.
|
207 |
+
optional int32 oneof_index = 9;
|
208 |
+
|
209 |
+
// JSON name of this field. The value is set by protocol compiler. If the
|
210 |
+
// user has set a "json_name" option on this field, that option's value
|
211 |
+
// will be used. Otherwise, it's deduced from the field's name by converting
|
212 |
+
// it to camelCase.
|
213 |
+
optional string json_name = 10;
|
214 |
+
|
215 |
+
optional FieldOptions options = 8;
|
216 |
+
|
217 |
+
// If true, this is a proto3 "optional". When a proto3 field is optional, it
|
218 |
+
// tracks presence regardless of field type.
|
219 |
+
//
|
220 |
+
// When proto3_optional is true, this field must be belong to a oneof to
|
221 |
+
// signal to old proto3 clients that presence is tracked for this field. This
|
222 |
+
// oneof is known as a "synthetic" oneof, and this field must be its sole
|
223 |
+
// member (each proto3 optional field gets its own synthetic oneof). Synthetic
|
224 |
+
// oneofs exist in the descriptor only, and do not generate any API. Synthetic
|
225 |
+
// oneofs must be ordered after all "real" oneofs.
|
226 |
+
//
|
227 |
+
// For message fields, proto3_optional doesn't create any semantic change,
|
228 |
+
// since non-repeated message fields always track presence. However it still
|
229 |
+
// indicates the semantic detail of whether the user wrote "optional" or not.
|
230 |
+
// This can be useful for round-tripping the .proto file. For consistency we
|
231 |
+
// give message fields a synthetic oneof also, even though it is not required
|
232 |
+
// to track presence. This is especially important because the parser can't
|
233 |
+
// tell if a field is a message or an enum, so it must always create a
|
234 |
+
// synthetic oneof.
|
235 |
+
//
|
236 |
+
// Proto2 optional fields do not set this flag, because they already indicate
|
237 |
+
// optional with `LABEL_OPTIONAL`.
|
238 |
+
optional bool proto3_optional = 17;
|
239 |
+
}
|
240 |
+
|
241 |
+
// Describes a oneof.
|
242 |
+
message OneofDescriptorProto {
|
243 |
+
optional string name = 1;
|
244 |
+
optional OneofOptions options = 2;
|
245 |
+
}
|
246 |
+
|
247 |
+
// Describes an enum type.
|
248 |
+
message EnumDescriptorProto {
|
249 |
+
optional string name = 1;
|
250 |
+
|
251 |
+
repeated EnumValueDescriptorProto value = 2;
|
252 |
+
|
253 |
+
optional EnumOptions options = 3;
|
254 |
+
|
255 |
+
// Range of reserved numeric values. Reserved values may not be used by
|
256 |
+
// entries in the same enum. Reserved ranges may not overlap.
|
257 |
+
//
|
258 |
+
// Note that this is distinct from DescriptorProto.ReservedRange in that it
|
259 |
+
// is inclusive such that it can appropriately represent the entire int32
|
260 |
+
// domain.
|
261 |
+
message EnumReservedRange {
|
262 |
+
optional int32 start = 1; // Inclusive.
|
263 |
+
optional int32 end = 2; // Inclusive.
|
264 |
+
}
|
265 |
+
|
266 |
+
// Range of reserved numeric values. Reserved numeric values may not be used
|
267 |
+
// by enum values in the same enum declaration. Reserved ranges may not
|
268 |
+
// overlap.
|
269 |
+
repeated EnumReservedRange reserved_range = 4;
|
270 |
+
|
271 |
+
// Reserved enum value names, which may not be reused. A given name may only
|
272 |
+
// be reserved once.
|
273 |
+
repeated string reserved_name = 5;
|
274 |
+
}
|
275 |
+
|
276 |
+
// Describes a value within an enum.
|
277 |
+
message EnumValueDescriptorProto {
|
278 |
+
optional string name = 1;
|
279 |
+
optional int32 number = 2;
|
280 |
+
|
281 |
+
optional EnumValueOptions options = 3;
|
282 |
+
}
|
283 |
+
|
284 |
+
// Describes a service.
|
285 |
+
message ServiceDescriptorProto {
|
286 |
+
optional string name = 1;
|
287 |
+
repeated MethodDescriptorProto method = 2;
|
288 |
+
|
289 |
+
optional ServiceOptions options = 3;
|
290 |
+
}
|
291 |
+
|
292 |
+
// Describes a method of a service.
|
293 |
+
message MethodDescriptorProto {
|
294 |
+
optional string name = 1;
|
295 |
+
|
296 |
+
// Input and output type names. These are resolved in the same way as
|
297 |
+
// FieldDescriptorProto.type_name, but must refer to a message type.
|
298 |
+
optional string input_type = 2;
|
299 |
+
optional string output_type = 3;
|
300 |
+
|
301 |
+
optional MethodOptions options = 4;
|
302 |
+
|
303 |
+
// Identifies if client streams multiple client messages
|
304 |
+
optional bool client_streaming = 5 [default = false];
|
305 |
+
// Identifies if server streams multiple server messages
|
306 |
+
optional bool server_streaming = 6 [default = false];
|
307 |
+
}
|
308 |
+
|
309 |
+
|
310 |
+
// ===================================================================
|
311 |
+
// Options
|
312 |
+
|
313 |
+
// Each of the definitions above may have "options" attached. These are
|
314 |
+
// just annotations which may cause code to be generated slightly differently
|
315 |
+
// or may contain hints for code that manipulates protocol messages.
|
316 |
+
//
|
317 |
+
// Clients may define custom options as extensions of the *Options messages.
|
318 |
+
// These extensions may not yet be known at parsing time, so the parser cannot
|
319 |
+
// store the values in them. Instead it stores them in a field in the *Options
|
320 |
+
// message called uninterpreted_option. This field must have the same name
|
321 |
+
// across all *Options messages. We then use this field to populate the
|
322 |
+
// extensions when we build a descriptor, at which point all protos have been
|
323 |
+
// parsed and so all extensions are known.
|
324 |
+
//
|
325 |
+
// Extension numbers for custom options may be chosen as follows:
|
326 |
+
// * For options which will only be used within a single application or
|
327 |
+
// organization, or for experimental options, use field numbers 50000
|
328 |
+
// through 99999. It is up to you to ensure that you do not use the
|
329 |
+
// same number for multiple options.
|
330 |
+
// * For options which will be published and used publicly by multiple
|
331 |
+
// independent entities, e-mail protobuf-global-extension-registry@google.com
|
332 |
+
// to reserve extension numbers. Simply provide your project name (e.g.
|
333 |
+
// Objective-C plugin) and your project website (if available) -- there's no
|
334 |
+
// need to explain how you intend to use them. Usually you only need one
|
335 |
+
// extension number. You can declare multiple options with only one extension
|
336 |
+
// number by putting them in a sub-message. See the Custom Options section of
|
337 |
+
// the docs for examples:
|
338 |
+
// https://developers.google.com/protocol-buffers/docs/proto#options
|
339 |
+
// If this turns out to be popular, a web service will be set up
|
340 |
+
// to automatically assign option numbers.
|
341 |
+
|
342 |
+
message FileOptions {
|
343 |
+
|
344 |
+
// Sets the Java package where classes generated from this .proto will be
|
345 |
+
// placed. By default, the proto package is used, but this is often
|
346 |
+
// inappropriate because proto packages do not normally start with backwards
|
347 |
+
// domain names.
|
348 |
+
optional string java_package = 1;
|
349 |
+
|
350 |
+
|
351 |
+
// If set, all the classes from the .proto file are wrapped in a single
|
352 |
+
// outer class with the given name. This applies to both Proto1
|
353 |
+
// (equivalent to the old "--one_java_file" option) and Proto2 (where
|
354 |
+
// a .proto always translates to a single class, but you may want to
|
355 |
+
// explicitly choose the class name).
|
356 |
+
optional string java_outer_classname = 8;
|
357 |
+
|
358 |
+
// If set true, then the Java code generator will generate a separate .java
|
359 |
+
// file for each top-level message, enum, and service defined in the .proto
|
360 |
+
// file. Thus, these types will *not* be nested inside the outer class
|
361 |
+
// named by java_outer_classname. However, the outer class will still be
|
362 |
+
// generated to contain the file's getDescriptor() method as well as any
|
363 |
+
// top-level extensions defined in the file.
|
364 |
+
optional bool java_multiple_files = 10 [default = false];
|
365 |
+
|
366 |
+
// This option does nothing.
|
367 |
+
optional bool java_generate_equals_and_hash = 20 [deprecated=true];
|
368 |
+
|
369 |
+
// If set true, then the Java2 code generator will generate code that
|
370 |
+
// throws an exception whenever an attempt is made to assign a non-UTF-8
|
371 |
+
// byte sequence to a string field.
|
372 |
+
// Message reflection will do the same.
|
373 |
+
// However, an extension field still accepts non-UTF-8 byte sequences.
|
374 |
+
// This option has no effect on when used with the lite runtime.
|
375 |
+
optional bool java_string_check_utf8 = 27 [default = false];
|
376 |
+
|
377 |
+
|
378 |
+
// Generated classes can be optimized for speed or code size.
|
379 |
+
enum OptimizeMode {
|
380 |
+
SPEED = 1; // Generate complete code for parsing, serialization,
|
381 |
+
// etc.
|
382 |
+
CODE_SIZE = 2; // Use ReflectionOps to implement these methods.
|
383 |
+
LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime.
|
384 |
+
}
|
385 |
+
optional OptimizeMode optimize_for = 9 [default = SPEED];
|
386 |
+
|
387 |
+
// Sets the Go package where structs generated from this .proto will be
|
388 |
+
// placed. If omitted, the Go package will be derived from the following:
|
389 |
+
// - The basename of the package import path, if provided.
|
390 |
+
// - Otherwise, the package statement in the .proto file, if present.
|
391 |
+
// - Otherwise, the basename of the .proto file, without extension.
|
392 |
+
optional string go_package = 11;
|
393 |
+
|
394 |
+
|
395 |
+
|
396 |
+
|
397 |
+
// Should generic services be generated in each language? "Generic" services
|
398 |
+
// are not specific to any particular RPC system. They are generated by the
|
399 |
+
// main code generators in each language (without additional plugins).
|
400 |
+
// Generic services were the only kind of service generation supported by
|
401 |
+
// early versions of google.protobuf.
|
402 |
+
//
|
403 |
+
// Generic services are now considered deprecated in favor of using plugins
|
404 |
+
// that generate code specific to your particular RPC system. Therefore,
|
405 |
+
// these default to false. Old code which depends on generic services should
|
406 |
+
// explicitly set them to true.
|
407 |
+
optional bool cc_generic_services = 16 [default = false];
|
408 |
+
optional bool java_generic_services = 17 [default = false];
|
409 |
+
optional bool py_generic_services = 18 [default = false];
|
410 |
+
optional bool php_generic_services = 42 [default = false];
|
411 |
+
|
412 |
+
// Is this file deprecated?
|
413 |
+
// Depending on the target platform, this can emit Deprecated annotations
|
414 |
+
// for everything in the file, or it will be completely ignored; in the very
|
415 |
+
// least, this is a formalization for deprecating files.
|
416 |
+
optional bool deprecated = 23 [default = false];
|
417 |
+
|
418 |
+
// Enables the use of arenas for the proto messages in this file. This applies
|
419 |
+
// only to generated classes for C++.
|
420 |
+
optional bool cc_enable_arenas = 31 [default = true];
|
421 |
+
|
422 |
+
|
423 |
+
// Sets the objective c class prefix which is prepended to all objective c
|
424 |
+
// generated classes from this .proto. There is no default.
|
425 |
+
optional string objc_class_prefix = 36;
|
426 |
+
|
427 |
+
// Namespace for generated classes; defaults to the package.
|
428 |
+
optional string csharp_namespace = 37;
|
429 |
+
|
430 |
+
// By default Swift generators will take the proto package and CamelCase it
|
431 |
+
// replacing '.' with underscore and use that to prefix the types/symbols
|
432 |
+
// defined. When this options is provided, they will use this value instead
|
433 |
+
// to prefix the types/symbols defined.
|
434 |
+
optional string swift_prefix = 39;
|
435 |
+
|
436 |
+
// Sets the php class prefix which is prepended to all php generated classes
|
437 |
+
// from this .proto. Default is empty.
|
438 |
+
optional string php_class_prefix = 40;
|
439 |
+
|
440 |
+
// Use this option to change the namespace of php generated classes. Default
|
441 |
+
// is empty. When this option is empty, the package name will be used for
|
442 |
+
// determining the namespace.
|
443 |
+
optional string php_namespace = 41;
|
444 |
+
|
445 |
+
// Use this option to change the namespace of php generated metadata classes.
|
446 |
+
// Default is empty. When this option is empty, the proto file name will be
|
447 |
+
// used for determining the namespace.
|
448 |
+
optional string php_metadata_namespace = 44;
|
449 |
+
|
450 |
+
// Use this option to change the package of ruby generated classes. Default
|
451 |
+
// is empty. When this option is not set, the package name will be used for
|
452 |
+
// determining the ruby package.
|
453 |
+
optional string ruby_package = 45;
|
454 |
+
|
455 |
+
|
456 |
+
// The parser stores options it doesn't recognize here.
|
457 |
+
// See the documentation for the "Options" section above.
|
458 |
+
repeated UninterpretedOption uninterpreted_option = 999;
|
459 |
+
|
460 |
+
// Clients can define custom options in extensions of this message.
|
461 |
+
// See the documentation for the "Options" section above.
|
462 |
+
extensions 1000 to max;
|
463 |
+
|
464 |
+
reserved 38;
|
465 |
+
}
|
466 |
+
|
467 |
+
message MessageOptions {
|
468 |
+
// Set true to use the old proto1 MessageSet wire format for extensions.
|
469 |
+
// This is provided for backwards-compatibility with the MessageSet wire
|
470 |
+
// format. You should not use this for any other reason: It's less
|
471 |
+
// efficient, has fewer features, and is more complicated.
|
472 |
+
//
|
473 |
+
// The message must be defined exactly as follows:
|
474 |
+
// message Foo {
|
475 |
+
// option message_set_wire_format = true;
|
476 |
+
// extensions 4 to max;
|
477 |
+
// }
|
478 |
+
// Note that the message cannot have any defined fields; MessageSets only
|
479 |
+
// have extensions.
|
480 |
+
//
|
481 |
+
// All extensions of your type must be singular messages; e.g. they cannot
|
482 |
+
// be int32s, enums, or repeated messages.
|
483 |
+
//
|
484 |
+
// Because this is an option, the above two restrictions are not enforced by
|
485 |
+
// the protocol compiler.
|
486 |
+
optional bool message_set_wire_format = 1 [default = false];
|
487 |
+
|
488 |
+
// Disables the generation of the standard "descriptor()" accessor, which can
|
489 |
+
// conflict with a field of the same name. This is meant to make migration
|
490 |
+
// from proto1 easier; new code should avoid fields named "descriptor".
|
491 |
+
optional bool no_standard_descriptor_accessor = 2 [default = false];
|
492 |
+
|
493 |
+
// Is this message deprecated?
|
494 |
+
// Depending on the target platform, this can emit Deprecated annotations
|
495 |
+
// for the message, or it will be completely ignored; in the very least,
|
496 |
+
// this is a formalization for deprecating messages.
|
497 |
+
optional bool deprecated = 3 [default = false];
|
498 |
+
|
499 |
+
// Whether the message is an automatically generated map entry type for the
|
500 |
+
// maps field.
|
501 |
+
//
|
502 |
+
// For maps fields:
|
503 |
+
// map<KeyType, ValueType> map_field = 1;
|
504 |
+
// The parsed descriptor looks like:
|
505 |
+
// message MapFieldEntry {
|
506 |
+
// option map_entry = true;
|
507 |
+
// optional KeyType key = 1;
|
508 |
+
// optional ValueType value = 2;
|
509 |
+
// }
|
510 |
+
// repeated MapFieldEntry map_field = 1;
|
511 |
+
//
|
512 |
+
// Implementations may choose not to generate the map_entry=true message, but
|
513 |
+
// use a native map in the target language to hold the keys and values.
|
514 |
+
// The reflection APIs in such implementations still need to work as
|
515 |
+
// if the field is a repeated message field.
|
516 |
+
//
|
517 |
+
// NOTE: Do not set the option in .proto files. Always use the maps syntax
|
518 |
+
// instead. The option should only be implicitly set by the proto compiler
|
519 |
+
// parser.
|
520 |
+
optional bool map_entry = 7;
|
521 |
+
|
522 |
+
reserved 8; // javalite_serializable
|
523 |
+
reserved 9; // javanano_as_lite
|
524 |
+
|
525 |
+
|
526 |
+
// The parser stores options it doesn't recognize here. See above.
|
527 |
+
repeated UninterpretedOption uninterpreted_option = 999;
|
528 |
+
|
529 |
+
// Clients can define custom options in extensions of this message. See above.
|
530 |
+
extensions 1000 to max;
|
531 |
+
}
|
532 |
+
|
533 |
+
message FieldOptions {
|
534 |
+
// The ctype option instructs the C++ code generator to use a different
|
535 |
+
// representation of the field than it normally would. See the specific
|
536 |
+
// options below. This option is not yet implemented in the open source
|
537 |
+
// release -- sorry, we'll try to include it in a future version!
|
538 |
+
optional CType ctype = 1 [default = STRING];
|
539 |
+
enum CType {
|
540 |
+
// Default mode.
|
541 |
+
STRING = 0;
|
542 |
+
|
543 |
+
CORD = 1;
|
544 |
+
|
545 |
+
STRING_PIECE = 2;
|
546 |
+
}
|
547 |
+
// The packed option can be enabled for repeated primitive fields to enable
|
548 |
+
// a more efficient representation on the wire. Rather than repeatedly
|
549 |
+
// writing the tag and type for each element, the entire array is encoded as
|
550 |
+
// a single length-delimited blob. In proto3, only explicit setting it to
|
551 |
+
// false will avoid using packed encoding.
|
552 |
+
optional bool packed = 2;
|
553 |
+
|
554 |
+
// The jstype option determines the JavaScript type used for values of the
|
555 |
+
// field. The option is permitted only for 64 bit integral and fixed types
|
556 |
+
// (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
|
557 |
+
// is represented as JavaScript string, which avoids loss of precision that
|
558 |
+
// can happen when a large value is converted to a floating point JavaScript.
|
559 |
+
// Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
|
560 |
+
// use the JavaScript "number" type. The behavior of the default option
|
561 |
+
// JS_NORMAL is implementation dependent.
|
562 |
+
//
|
563 |
+
// This option is an enum to permit additional types to be added, e.g.
|
564 |
+
// goog.math.Integer.
|
565 |
+
optional JSType jstype = 6 [default = JS_NORMAL];
|
566 |
+
enum JSType {
|
567 |
+
// Use the default type.
|
568 |
+
JS_NORMAL = 0;
|
569 |
+
|
570 |
+
// Use JavaScript strings.
|
571 |
+
JS_STRING = 1;
|
572 |
+
|
573 |
+
// Use JavaScript numbers.
|
574 |
+
JS_NUMBER = 2;
|
575 |
+
}
|
576 |
+
|
577 |
+
// Should this field be parsed lazily? Lazy applies only to message-type
|
578 |
+
// fields. It means that when the outer message is initially parsed, the
|
579 |
+
// inner message's contents will not be parsed but instead stored in encoded
|
580 |
+
// form. The inner message will actually be parsed when it is first accessed.
|
581 |
+
//
|
582 |
+
// This is only a hint. Implementations are free to choose whether to use
|
583 |
+
// eager or lazy parsing regardless of the value of this option. However,
|
584 |
+
// setting this option true suggests that the protocol author believes that
|
585 |
+
// using lazy parsing on this field is worth the additional bookkeeping
|
586 |
+
// overhead typically needed to implement it.
|
587 |
+
//
|
588 |
+
// This option does not affect the public interface of any generated code;
|
589 |
+
// all method signatures remain the same. Furthermore, thread-safety of the
|
590 |
+
// interface is not affected by this option; const methods remain safe to
|
591 |
+
// call from multiple threads concurrently, while non-const methods continue
|
592 |
+
// to require exclusive access.
|
593 |
+
//
|
594 |
+
//
|
595 |
+
// Note that implementations may choose not to check required fields within
|
596 |
+
// a lazy sub-message. That is, calling IsInitialized() on the outer message
|
597 |
+
// may return true even if the inner message has missing required fields.
|
598 |
+
// This is necessary because otherwise the inner message would have to be
|
599 |
+
// parsed in order to perform the check, defeating the purpose of lazy
|
600 |
+
// parsing. An implementation which chooses not to check required fields
|
601 |
+
// must be consistent about it. That is, for any particular sub-message, the
|
602 |
+
// implementation must either *always* check its required fields, or *never*
|
603 |
+
// check its required fields, regardless of whether or not the message has
|
604 |
+
// been parsed.
|
605 |
+
optional bool lazy = 5 [default = false];
|
606 |
+
|
607 |
+
// Is this field deprecated?
|
608 |
+
// Depending on the target platform, this can emit Deprecated annotations
|
609 |
+
// for accessors, or it will be completely ignored; in the very least, this
|
610 |
+
// is a formalization for deprecating fields.
|
611 |
+
optional bool deprecated = 3 [default = false];
|
612 |
+
|
613 |
+
// For Google-internal migration only. Do not use.
|
614 |
+
optional bool weak = 10 [default = false];
|
615 |
+
|
616 |
+
|
617 |
+
// The parser stores options it doesn't recognize here. See above.
|
618 |
+
repeated UninterpretedOption uninterpreted_option = 999;
|
619 |
+
|
620 |
+
// Clients can define custom options in extensions of this message. See above.
|
621 |
+
extensions 1000 to max;
|
622 |
+
|
623 |
+
reserved 4; // removed jtype
|
624 |
+
}
|
625 |
+
|
626 |
+
message OneofOptions {
|
627 |
+
// The parser stores options it doesn't recognize here. See above.
|
628 |
+
repeated UninterpretedOption uninterpreted_option = 999;
|
629 |
+
|
630 |
+
// Clients can define custom options in extensions of this message. See above.
|
631 |
+
extensions 1000 to max;
|
632 |
+
}
|
633 |
+
|
634 |
+
message EnumOptions {
|
635 |
+
|
636 |
+
// Set this option to true to allow mapping different tag names to the same
|
637 |
+
// value.
|
638 |
+
optional bool allow_alias = 2;
|
639 |
+
|
640 |
+
// Is this enum deprecated?
|
641 |
+
// Depending on the target platform, this can emit Deprecated annotations
|
642 |
+
// for the enum, or it will be completely ignored; in the very least, this
|
643 |
+
// is a formalization for deprecating enums.
|
644 |
+
optional bool deprecated = 3 [default = false];
|
645 |
+
|
646 |
+
reserved 5; // javanano_as_lite
|
647 |
+
|
648 |
+
// The parser stores options it doesn't recognize here. See above.
|
649 |
+
repeated UninterpretedOption uninterpreted_option = 999;
|
650 |
+
|
651 |
+
// Clients can define custom options in extensions of this message. See above.
|
652 |
+
extensions 1000 to max;
|
653 |
+
}
|
654 |
+
|
655 |
+
message EnumValueOptions {
|
656 |
+
// Is this enum value deprecated?
|
657 |
+
// Depending on the target platform, this can emit Deprecated annotations
|
658 |
+
// for the enum value, or it will be completely ignored; in the very least,
|
659 |
+
// this is a formalization for deprecating enum values.
|
660 |
+
optional bool deprecated = 1 [default = false];
|
661 |
+
|
662 |
+
// The parser stores options it doesn't recognize here. See above.
|
663 |
+
repeated UninterpretedOption uninterpreted_option = 999;
|
664 |
+
|
665 |
+
// Clients can define custom options in extensions of this message. See above.
|
666 |
+
extensions 1000 to max;
|
667 |
+
}
|
668 |
+
|
669 |
+
message ServiceOptions {
|
670 |
+
|
671 |
+
// Note: Field numbers 1 through 32 are reserved for Google's internal RPC
|
672 |
+
// framework. We apologize for hoarding these numbers to ourselves, but
|
673 |
+
// we were already using them long before we decided to release Protocol
|
674 |
+
// Buffers.
|
675 |
+
|
676 |
+
// Is this service deprecated?
|
677 |
+
// Depending on the target platform, this can emit Deprecated annotations
|
678 |
+
// for the service, or it will be completely ignored; in the very least,
|
679 |
+
// this is a formalization for deprecating services.
|
680 |
+
optional bool deprecated = 33 [default = false];
|
681 |
+
|
682 |
+
// The parser stores options it doesn't recognize here. See above.
|
683 |
+
repeated UninterpretedOption uninterpreted_option = 999;
|
684 |
+
|
685 |
+
// Clients can define custom options in extensions of this message. See above.
|
686 |
+
extensions 1000 to max;
|
687 |
+
}
|
688 |
+
|
689 |
+
message MethodOptions {
|
690 |
+
|
691 |
+
// Note: Field numbers 1 through 32 are reserved for Google's internal RPC
|
692 |
+
// framework. We apologize for hoarding these numbers to ourselves, but
|
693 |
+
// we were already using them long before we decided to release Protocol
|
694 |
+
// Buffers.
|
695 |
+
|
696 |
+
// Is this method deprecated?
|
697 |
+
// Depending on the target platform, this can emit Deprecated annotations
|
698 |
+
// for the method, or it will be completely ignored; in the very least,
|
699 |
+
// this is a formalization for deprecating methods.
|
700 |
+
optional bool deprecated = 33 [default = false];
|
701 |
+
|
702 |
+
// Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
|
703 |
+
// or neither? HTTP based RPC implementation may choose GET verb for safe
|
704 |
+
// methods, and PUT verb for idempotent methods instead of the default POST.
|
705 |
+
enum IdempotencyLevel {
|
706 |
+
IDEMPOTENCY_UNKNOWN = 0;
|
707 |
+
NO_SIDE_EFFECTS = 1; // implies idempotent
|
708 |
+
IDEMPOTENT = 2; // idempotent, but may have side effects
|
709 |
+
}
|
710 |
+
optional IdempotencyLevel idempotency_level = 34
|
711 |
+
[default = IDEMPOTENCY_UNKNOWN];
|
712 |
+
|
713 |
+
// The parser stores options it doesn't recognize here. See above.
|
714 |
+
repeated UninterpretedOption uninterpreted_option = 999;
|
715 |
+
|
716 |
+
// Clients can define custom options in extensions of this message. See above.
|
717 |
+
extensions 1000 to max;
|
718 |
+
}
|
719 |
+
|
720 |
+
|
721 |
+
// A message representing a option the parser does not recognize. This only
|
722 |
+
// appears in options protos created by the compiler::Parser class.
|
723 |
+
// DescriptorPool resolves these when building Descriptor objects. Therefore,
|
724 |
+
// options protos in descriptor objects (e.g. returned by Descriptor::options(),
|
725 |
+
// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
|
726 |
+
// in them.
|
727 |
+
message UninterpretedOption {
|
728 |
+
// The name of the uninterpreted option. Each string represents a segment in
|
729 |
+
// a dot-separated name. is_extension is true iff a segment represents an
|
730 |
+
// extension (denoted with parentheses in options specs in .proto files).
|
731 |
+
// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents
|
732 |
+
// "foo.(bar.baz).qux".
|
733 |
+
message NamePart {
|
734 |
+
required string name_part = 1;
|
735 |
+
required bool is_extension = 2;
|
736 |
+
}
|
737 |
+
repeated NamePart name = 2;
|
738 |
+
|
739 |
+
// The value of the uninterpreted option, in whatever type the tokenizer
|
740 |
+
// identified it as during parsing. Exactly one of these should be set.
|
741 |
+
optional string identifier_value = 3;
|
742 |
+
optional uint64 positive_int_value = 4;
|
743 |
+
optional int64 negative_int_value = 5;
|
744 |
+
optional double double_value = 6;
|
745 |
+
optional bytes string_value = 7;
|
746 |
+
optional string aggregate_value = 8;
|
747 |
+
}
|
748 |
+
|
749 |
+
// ===================================================================
|
750 |
+
// Optional source code info
|
751 |
+
|
752 |
+
// Encapsulates information about the original source file from which a
|
753 |
+
// FileDescriptorProto was generated.
|
754 |
+
message SourceCodeInfo {
|
755 |
+
// A Location identifies a piece of source code in a .proto file which
|
756 |
+
// corresponds to a particular definition. This information is intended
|
757 |
+
// to be useful to IDEs, code indexers, documentation generators, and similar
|
758 |
+
// tools.
|
759 |
+
//
|
760 |
+
// For example, say we have a file like:
|
761 |
+
// message Foo {
|
762 |
+
// optional string foo = 1;
|
763 |
+
// }
|
764 |
+
// Let's look at just the field definition:
|
765 |
+
// optional string foo = 1;
|
766 |
+
// ^ ^^ ^^ ^ ^^^
|
767 |
+
// a bc de f ghi
|
768 |
+
// We have the following locations:
|
769 |
+
// span path represents
|
770 |
+
// [a,i) [ 4, 0, 2, 0 ] The whole field definition.
|
771 |
+
// [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
|
772 |
+
// [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
|
773 |
+
// [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
|
774 |
+
// [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
|
775 |
+
//
|
776 |
+
// Notes:
|
777 |
+
// - A location may refer to a repeated field itself (i.e. not to any
|
778 |
+
// particular index within it). This is used whenever a set of elements are
|
779 |
+
// logically enclosed in a single code segment. For example, an entire
|
780 |
+
// extend block (possibly containing multiple extension definitions) will
|
781 |
+
// have an outer location whose path refers to the "extensions" repeated
|
782 |
+
// field without an index.
|
783 |
+
// - Multiple locations may have the same path. This happens when a single
|
784 |
+
// logical declaration is spread out across multiple places. The most
|
785 |
+
// obvious example is the "extend" block again -- there may be multiple
|
786 |
+
// extend blocks in the same scope, each of which will have the same path.
|
787 |
+
// - A location's span is not always a subset of its parent's span. For
|
788 |
+
// example, the "extendee" of an extension declaration appears at the
|
789 |
+
// beginning of the "extend" block and is shared by all extensions within
|
790 |
+
// the block.
|
791 |
+
// - Just because a location's span is a subset of some other location's span
|
792 |
+
// does not mean that it is a descendant. For example, a "group" defines
|
793 |
+
// both a type and a field in a single declaration. Thus, the locations
|
794 |
+
// corresponding to the type and field and their components will overlap.
|
795 |
+
// - Code which tries to interpret locations should probably be designed to
|
796 |
+
// ignore those that it doesn't understand, as more types of locations could
|
797 |
+
// be recorded in the future.
|
798 |
+
repeated Location location = 1;
|
799 |
+
message Location {
|
800 |
+
// Identifies which part of the FileDescriptorProto was defined at this
|
801 |
+
// location.
|
802 |
+
//
|
803 |
+
// Each element is a field number or an index. They form a path from
|
804 |
+
// the root FileDescriptorProto to the place where the definition. For
|
805 |
+
// example, this path:
|
806 |
+
// [ 4, 3, 2, 7, 1 ]
|
807 |
+
// refers to:
|
808 |
+
// file.message_type(3) // 4, 3
|
809 |
+
// .field(7) // 2, 7
|
810 |
+
// .name() // 1
|
811 |
+
// This is because FileDescriptorProto.message_type has field number 4:
|
812 |
+
// repeated DescriptorProto message_type = 4;
|
813 |
+
// and DescriptorProto.field has field number 2:
|
814 |
+
// repeated FieldDescriptorProto field = 2;
|
815 |
+
// and FieldDescriptorProto.name has field number 1:
|
816 |
+
// optional string name = 1;
|
817 |
+
//
|
818 |
+
// Thus, the above path gives the location of a field name. If we removed
|
819 |
+
// the last element:
|
820 |
+
// [ 4, 3, 2, 7 ]
|
821 |
+
// this path refers to the whole field declaration (from the beginning
|
822 |
+
// of the label to the terminating semicolon).
|
823 |
+
repeated int32 path = 1 [packed = true];
|
824 |
+
|
825 |
+
// Always has exactly three or four elements: start line, start column,
|
826 |
+
// end line (optional, otherwise assumed same as start line), end column.
|
827 |
+
// These are packed into a single field for efficiency. Note that line
|
828 |
+
// and column numbers are zero-based -- typically you will want to add
|
829 |
+
// 1 to each before displaying to a user.
|
830 |
+
repeated int32 span = 2 [packed = true];
|
831 |
+
|
832 |
+
// If this SourceCodeInfo represents a complete declaration, these are any
|
833 |
+
// comments appearing before and after the declaration which appear to be
|
834 |
+
// attached to the declaration.
|
835 |
+
//
|
836 |
+
// A series of line comments appearing on consecutive lines, with no other
|
837 |
+
// tokens appearing on those lines, will be treated as a single comment.
|
838 |
+
//
|
839 |
+
// leading_detached_comments will keep paragraphs of comments that appear
|
840 |
+
// before (but not connected to) the current element. Each paragraph,
|
841 |
+
// separated by empty lines, will be one comment element in the repeated
|
842 |
+
// field.
|
843 |
+
//
|
844 |
+
// Only the comment content is provided; comment markers (e.g. //) are
|
845 |
+
// stripped out. For block comments, leading whitespace and an asterisk
|
846 |
+
// will be stripped from the beginning of each line other than the first.
|
847 |
+
// Newlines are included in the output.
|
848 |
+
//
|
849 |
+
// Examples:
|
850 |
+
//
|
851 |
+
// optional int32 foo = 1; // Comment attached to foo.
|
852 |
+
// // Comment attached to bar.
|
853 |
+
// optional int32 bar = 2;
|
854 |
+
//
|
855 |
+
// optional string baz = 3;
|
856 |
+
// // Comment attached to baz.
|
857 |
+
// // Another line attached to baz.
|
858 |
+
//
|
859 |
+
// // Comment attached to qux.
|
860 |
+
// //
|
861 |
+
// // Another line attached to qux.
|
862 |
+
// optional double qux = 4;
|
863 |
+
//
|
864 |
+
// // Detached comment for corge. This is not leading or trailing comments
|
865 |
+
// // to qux or corge because there are blank lines separating it from
|
866 |
+
// // both.
|
867 |
+
//
|
868 |
+
// // Detached comment for corge paragraph 2.
|
869 |
+
//
|
870 |
+
// optional string corge = 5;
|
871 |
+
// /* Block comment attached
|
872 |
+
// * to corge. Leading asterisks
|
873 |
+
// * will be removed. */
|
874 |
+
// /* Block comment attached to
|
875 |
+
// * grault. */
|
876 |
+
// optional int32 grault = 6;
|
877 |
+
//
|
878 |
+
// // ignored detached comments.
|
879 |
+
optional string leading_comments = 3;
|
880 |
+
optional string trailing_comments = 4;
|
881 |
+
repeated string leading_detached_comments = 6;
|
882 |
+
}
|
883 |
+
}
|
884 |
+
|
885 |
+
// Describes the relationship between generated code and its original source
|
886 |
+
// file. A GeneratedCodeInfo message is associated with only one generated
|
887 |
+
// source file, but may contain references to different source .proto files.
|
888 |
+
message GeneratedCodeInfo {
|
889 |
+
// An Annotation connects some span of text in generated code to an element
|
890 |
+
// of its generating .proto file.
|
891 |
+
repeated Annotation annotation = 1;
|
892 |
+
message Annotation {
|
893 |
+
// Identifies the element in the original source .proto file. This field
|
894 |
+
// is formatted the same as SourceCodeInfo.Location.path.
|
895 |
+
repeated int32 path = 1 [packed = true];
|
896 |
+
|
897 |
+
// Identifies the filesystem path to the original source .proto.
|
898 |
+
optional string source_file = 2;
|
899 |
+
|
900 |
+
// Identifies the starting offset in bytes in the generated code
|
901 |
+
// that relates to the identified object.
|
902 |
+
optional int32 begin = 3;
|
903 |
+
|
904 |
+
// Identifies the ending offset in bytes in the generated code that
|
905 |
+
// relates to the identified offset. The end offset should be one past
|
906 |
+
// the last relevant byte (so the length of the text = end - begin).
|
907 |
+
optional int32 end = 4;
|
908 |
+
}
|
909 |
+
}
|
protoc/include/google/protobuf/duration.proto
ADDED
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
36 |
+
option cc_enable_arenas = true;
|
37 |
+
option go_package = "google.golang.org/protobuf/types/known/durationpb";
|
38 |
+
option java_package = "com.google.protobuf";
|
39 |
+
option java_outer_classname = "DurationProto";
|
40 |
+
option java_multiple_files = true;
|
41 |
+
option objc_class_prefix = "GPB";
|
42 |
+
|
43 |
+
// A Duration represents a signed, fixed-length span of time represented
|
44 |
+
// as a count of seconds and fractions of seconds at nanosecond
|
45 |
+
// resolution. It is independent of any calendar and concepts like "day"
|
46 |
+
// or "month". It is related to Timestamp in that the difference between
|
47 |
+
// two Timestamp values is a Duration and it can be added or subtracted
|
48 |
+
// from a Timestamp. Range is approximately +-10,000 years.
|
49 |
+
//
|
50 |
+
// # Examples
|
51 |
+
//
|
52 |
+
// Example 1: Compute Duration from two Timestamps in pseudo code.
|
53 |
+
//
|
54 |
+
// Timestamp start = ...;
|
55 |
+
// Timestamp end = ...;
|
56 |
+
// Duration duration = ...;
|
57 |
+
//
|
58 |
+
// duration.seconds = end.seconds - start.seconds;
|
59 |
+
// duration.nanos = end.nanos - start.nanos;
|
60 |
+
//
|
61 |
+
// if (duration.seconds < 0 && duration.nanos > 0) {
|
62 |
+
// duration.seconds += 1;
|
63 |
+
// duration.nanos -= 1000000000;
|
64 |
+
// } else if (duration.seconds > 0 && duration.nanos < 0) {
|
65 |
+
// duration.seconds -= 1;
|
66 |
+
// duration.nanos += 1000000000;
|
67 |
+
// }
|
68 |
+
//
|
69 |
+
// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
|
70 |
+
//
|
71 |
+
// Timestamp start = ...;
|
72 |
+
// Duration duration = ...;
|
73 |
+
// Timestamp end = ...;
|
74 |
+
//
|
75 |
+
// end.seconds = start.seconds + duration.seconds;
|
76 |
+
// end.nanos = start.nanos + duration.nanos;
|
77 |
+
//
|
78 |
+
// if (end.nanos < 0) {
|
79 |
+
// end.seconds -= 1;
|
80 |
+
// end.nanos += 1000000000;
|
81 |
+
// } else if (end.nanos >= 1000000000) {
|
82 |
+
// end.seconds += 1;
|
83 |
+
// end.nanos -= 1000000000;
|
84 |
+
// }
|
85 |
+
//
|
86 |
+
// Example 3: Compute Duration from datetime.timedelta in Python.
|
87 |
+
//
|
88 |
+
// td = datetime.timedelta(days=3, minutes=10)
|
89 |
+
// duration = Duration()
|
90 |
+
// duration.FromTimedelta(td)
|
91 |
+
//
|
92 |
+
// # JSON Mapping
|
93 |
+
//
|
94 |
+
// In JSON format, the Duration type is encoded as a string rather than an
|
95 |
+
// object, where the string ends in the suffix "s" (indicating seconds) and
|
96 |
+
// is preceded by the number of seconds, with nanoseconds expressed as
|
97 |
+
// fractional seconds. For example, 3 seconds with 0 nanoseconds should be
|
98 |
+
// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
|
99 |
+
// be expressed in JSON format as "3.000000001s", and 3 seconds and 1
|
100 |
+
// microsecond should be expressed in JSON format as "3.000001s".
|
101 |
+
//
|
102 |
+
//
|
103 |
+
message Duration {
|
104 |
+
// Signed seconds of the span of time. Must be from -315,576,000,000
|
105 |
+
// to +315,576,000,000 inclusive. Note: these bounds are computed from:
|
106 |
+
// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
|
107 |
+
int64 seconds = 1;
|
108 |
+
|
109 |
+
// Signed fractions of a second at nanosecond resolution of the span
|
110 |
+
// of time. Durations less than one second are represented with a 0
|
111 |
+
// `seconds` field and a positive or negative `nanos` field. For durations
|
112 |
+
// of one second or more, a non-zero value for the `nanos` field must be
|
113 |
+
// of the same sign as the `seconds` field. Must be from -999,999,999
|
114 |
+
// to +999,999,999 inclusive.
|
115 |
+
int32 nanos = 2;
|
116 |
+
}
|
protoc/include/google/protobuf/empty.proto
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
36 |
+
option go_package = "google.golang.org/protobuf/types/known/emptypb";
|
37 |
+
option java_package = "com.google.protobuf";
|
38 |
+
option java_outer_classname = "EmptyProto";
|
39 |
+
option java_multiple_files = true;
|
40 |
+
option objc_class_prefix = "GPB";
|
41 |
+
option cc_enable_arenas = true;
|
42 |
+
|
43 |
+
// A generic empty message that you can re-use to avoid defining duplicated
|
44 |
+
// empty messages in your APIs. A typical example is to use it as the request
|
45 |
+
// or the response type of an API method. For instance:
|
46 |
+
//
|
47 |
+
// service Foo {
|
48 |
+
// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
49 |
+
// }
|
50 |
+
//
|
51 |
+
// The JSON representation for `Empty` is empty JSON object `{}`.
|
52 |
+
message Empty {}
|
protoc/include/google/protobuf/field_mask.proto
ADDED
@@ -0,0 +1,245 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
36 |
+
option java_package = "com.google.protobuf";
|
37 |
+
option java_outer_classname = "FieldMaskProto";
|
38 |
+
option java_multiple_files = true;
|
39 |
+
option objc_class_prefix = "GPB";
|
40 |
+
option go_package = "google.golang.org/protobuf/types/known/fieldmaskpb";
|
41 |
+
option cc_enable_arenas = true;
|
42 |
+
|
43 |
+
// `FieldMask` represents a set of symbolic field paths, for example:
|
44 |
+
//
|
45 |
+
// paths: "f.a"
|
46 |
+
// paths: "f.b.d"
|
47 |
+
//
|
48 |
+
// Here `f` represents a field in some root message, `a` and `b`
|
49 |
+
// fields in the message found in `f`, and `d` a field found in the
|
50 |
+
// message in `f.b`.
|
51 |
+
//
|
52 |
+
// Field masks are used to specify a subset of fields that should be
|
53 |
+
// returned by a get operation or modified by an update operation.
|
54 |
+
// Field masks also have a custom JSON encoding (see below).
|
55 |
+
//
|
56 |
+
// # Field Masks in Projections
|
57 |
+
//
|
58 |
+
// When used in the context of a projection, a response message or
|
59 |
+
// sub-message is filtered by the API to only contain those fields as
|
60 |
+
// specified in the mask. For example, if the mask in the previous
|
61 |
+
// example is applied to a response message as follows:
|
62 |
+
//
|
63 |
+
// f {
|
64 |
+
// a : 22
|
65 |
+
// b {
|
66 |
+
// d : 1
|
67 |
+
// x : 2
|
68 |
+
// }
|
69 |
+
// y : 13
|
70 |
+
// }
|
71 |
+
// z: 8
|
72 |
+
//
|
73 |
+
// The result will not contain specific values for fields x,y and z
|
74 |
+
// (their value will be set to the default, and omitted in proto text
|
75 |
+
// output):
|
76 |
+
//
|
77 |
+
//
|
78 |
+
// f {
|
79 |
+
// a : 22
|
80 |
+
// b {
|
81 |
+
// d : 1
|
82 |
+
// }
|
83 |
+
// }
|
84 |
+
//
|
85 |
+
// A repeated field is not allowed except at the last position of a
|
86 |
+
// paths string.
|
87 |
+
//
|
88 |
+
// If a FieldMask object is not present in a get operation, the
|
89 |
+
// operation applies to all fields (as if a FieldMask of all fields
|
90 |
+
// had been specified).
|
91 |
+
//
|
92 |
+
// Note that a field mask does not necessarily apply to the
|
93 |
+
// top-level response message. In case of a REST get operation, the
|
94 |
+
// field mask applies directly to the response, but in case of a REST
|
95 |
+
// list operation, the mask instead applies to each individual message
|
96 |
+
// in the returned resource list. In case of a REST custom method,
|
97 |
+
// other definitions may be used. Where the mask applies will be
|
98 |
+
// clearly documented together with its declaration in the API. In
|
99 |
+
// any case, the effect on the returned resource/resources is required
|
100 |
+
// behavior for APIs.
|
101 |
+
//
|
102 |
+
// # Field Masks in Update Operations
|
103 |
+
//
|
104 |
+
// A field mask in update operations specifies which fields of the
|
105 |
+
// targeted resource are going to be updated. The API is required
|
106 |
+
// to only change the values of the fields as specified in the mask
|
107 |
+
// and leave the others untouched. If a resource is passed in to
|
108 |
+
// describe the updated values, the API ignores the values of all
|
109 |
+
// fields not covered by the mask.
|
110 |
+
//
|
111 |
+
// If a repeated field is specified for an update operation, new values will
|
112 |
+
// be appended to the existing repeated field in the target resource. Note that
|
113 |
+
// a repeated field is only allowed in the last position of a `paths` string.
|
114 |
+
//
|
115 |
+
// If a sub-message is specified in the last position of the field mask for an
|
116 |
+
// update operation, then new value will be merged into the existing sub-message
|
117 |
+
// in the target resource.
|
118 |
+
//
|
119 |
+
// For example, given the target message:
|
120 |
+
//
|
121 |
+
// f {
|
122 |
+
// b {
|
123 |
+
// d: 1
|
124 |
+
// x: 2
|
125 |
+
// }
|
126 |
+
// c: [1]
|
127 |
+
// }
|
128 |
+
//
|
129 |
+
// And an update message:
|
130 |
+
//
|
131 |
+
// f {
|
132 |
+
// b {
|
133 |
+
// d: 10
|
134 |
+
// }
|
135 |
+
// c: [2]
|
136 |
+
// }
|
137 |
+
//
|
138 |
+
// then if the field mask is:
|
139 |
+
//
|
140 |
+
// paths: ["f.b", "f.c"]
|
141 |
+
//
|
142 |
+
// then the result will be:
|
143 |
+
//
|
144 |
+
// f {
|
145 |
+
// b {
|
146 |
+
// d: 10
|
147 |
+
// x: 2
|
148 |
+
// }
|
149 |
+
// c: [1, 2]
|
150 |
+
// }
|
151 |
+
//
|
152 |
+
// An implementation may provide options to override this default behavior for
|
153 |
+
// repeated and message fields.
|
154 |
+
//
|
155 |
+
// In order to reset a field's value to the default, the field must
|
156 |
+
// be in the mask and set to the default value in the provided resource.
|
157 |
+
// Hence, in order to reset all fields of a resource, provide a default
|
158 |
+
// instance of the resource and set all fields in the mask, or do
|
159 |
+
// not provide a mask as described below.
|
160 |
+
//
|
161 |
+
// If a field mask is not present on update, the operation applies to
|
162 |
+
// all fields (as if a field mask of all fields has been specified).
|
163 |
+
// Note that in the presence of schema evolution, this may mean that
|
164 |
+
// fields the client does not know and has therefore not filled into
|
165 |
+
// the request will be reset to their default. If this is unwanted
|
166 |
+
// behavior, a specific service may require a client to always specify
|
167 |
+
// a field mask, producing an error if not.
|
168 |
+
//
|
169 |
+
// As with get operations, the location of the resource which
|
170 |
+
// describes the updated values in the request message depends on the
|
171 |
+
// operation kind. In any case, the effect of the field mask is
|
172 |
+
// required to be honored by the API.
|
173 |
+
//
|
174 |
+
// ## Considerations for HTTP REST
|
175 |
+
//
|
176 |
+
// The HTTP kind of an update operation which uses a field mask must
|
177 |
+
// be set to PATCH instead of PUT in order to satisfy HTTP semantics
|
178 |
+
// (PUT must only be used for full updates).
|
179 |
+
//
|
180 |
+
// # JSON Encoding of Field Masks
|
181 |
+
//
|
182 |
+
// In JSON, a field mask is encoded as a single string where paths are
|
183 |
+
// separated by a comma. Fields name in each path are converted
|
184 |
+
// to/from lower-camel naming conventions.
|
185 |
+
//
|
186 |
+
// As an example, consider the following message declarations:
|
187 |
+
//
|
188 |
+
// message Profile {
|
189 |
+
// User user = 1;
|
190 |
+
// Photo photo = 2;
|
191 |
+
// }
|
192 |
+
// message User {
|
193 |
+
// string display_name = 1;
|
194 |
+
// string address = 2;
|
195 |
+
// }
|
196 |
+
//
|
197 |
+
// In proto a field mask for `Profile` may look as such:
|
198 |
+
//
|
199 |
+
// mask {
|
200 |
+
// paths: "user.display_name"
|
201 |
+
// paths: "photo"
|
202 |
+
// }
|
203 |
+
//
|
204 |
+
// In JSON, the same mask is represented as below:
|
205 |
+
//
|
206 |
+
// {
|
207 |
+
// mask: "user.displayName,photo"
|
208 |
+
// }
|
209 |
+
//
|
210 |
+
// # Field Masks and Oneof Fields
|
211 |
+
//
|
212 |
+
// Field masks treat fields in oneofs just as regular fields. Consider the
|
213 |
+
// following message:
|
214 |
+
//
|
215 |
+
// message SampleMessage {
|
216 |
+
// oneof test_oneof {
|
217 |
+
// string name = 4;
|
218 |
+
// SubMessage sub_message = 9;
|
219 |
+
// }
|
220 |
+
// }
|
221 |
+
//
|
222 |
+
// The field mask can be:
|
223 |
+
//
|
224 |
+
// mask {
|
225 |
+
// paths: "name"
|
226 |
+
// }
|
227 |
+
//
|
228 |
+
// Or:
|
229 |
+
//
|
230 |
+
// mask {
|
231 |
+
// paths: "sub_message"
|
232 |
+
// }
|
233 |
+
//
|
234 |
+
// Note that oneof type names ("test_oneof" in this case) cannot be used in
|
235 |
+
// paths.
|
236 |
+
//
|
237 |
+
// ## Field Mask Verification
|
238 |
+
//
|
239 |
+
// The implementation of any API method which has a FieldMask type field in the
|
240 |
+
// request should verify the included field paths, and return an
|
241 |
+
// `INVALID_ARGUMENT` error if any path is unmappable.
|
242 |
+
message FieldMask {
|
243 |
+
// The set of field mask paths.
|
244 |
+
repeated string paths = 1;
|
245 |
+
}
|
protoc/include/google/protobuf/source_context.proto
ADDED
@@ -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 csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
36 |
+
option java_package = "com.google.protobuf";
|
37 |
+
option java_outer_classname = "SourceContextProto";
|
38 |
+
option java_multiple_files = true;
|
39 |
+
option objc_class_prefix = "GPB";
|
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 |
+
}
|
protoc/include/google/protobuf/struct.proto
ADDED
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
36 |
+
option cc_enable_arenas = true;
|
37 |
+
option go_package = "google.golang.org/protobuf/types/known/structpb";
|
38 |
+
option java_package = "com.google.protobuf";
|
39 |
+
option java_outer_classname = "StructProto";
|
40 |
+
option java_multiple_files = true;
|
41 |
+
option objc_class_prefix = "GPB";
|
42 |
+
|
43 |
+
// `Struct` represents a structured data value, consisting of fields
|
44 |
+
// which map to dynamically typed values. In some languages, `Struct`
|
45 |
+
// might be supported by a native representation. For example, in
|
46 |
+
// scripting languages like JS a struct is represented as an
|
47 |
+
// object. The details of that representation are described together
|
48 |
+
// with the proto support for the language.
|
49 |
+
//
|
50 |
+
// The JSON representation for `Struct` is JSON object.
|
51 |
+
message Struct {
|
52 |
+
// Unordered map of dynamically typed values.
|
53 |
+
map<string, Value> fields = 1;
|
54 |
+
}
|
55 |
+
|
56 |
+
// `Value` represents a dynamically typed value which can be either
|
57 |
+
// null, a number, a string, a boolean, a recursive struct value, or a
|
58 |
+
// list of values. A producer of value is expected to set one of that
|
59 |
+
// variants, absence of any variant indicates an error.
|
60 |
+
//
|
61 |
+
// The JSON representation for `Value` is JSON value.
|
62 |
+
message Value {
|
63 |
+
// The kind of value.
|
64 |
+
oneof kind {
|
65 |
+
// Represents a null value.
|
66 |
+
NullValue null_value = 1;
|
67 |
+
// Represents a double value.
|
68 |
+
double number_value = 2;
|
69 |
+
// Represents a string value.
|
70 |
+
string string_value = 3;
|
71 |
+
// Represents a boolean value.
|
72 |
+
bool bool_value = 4;
|
73 |
+
// Represents a structured value.
|
74 |
+
Struct struct_value = 5;
|
75 |
+
// Represents a repeated `Value`.
|
76 |
+
ListValue list_value = 6;
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
// `NullValue` is a singleton enumeration to represent the null value for the
|
81 |
+
// `Value` type union.
|
82 |
+
//
|
83 |
+
// The JSON representation for `NullValue` is JSON `null`.
|
84 |
+
enum NullValue {
|
85 |
+
// Null value.
|
86 |
+
NULL_VALUE = 0;
|
87 |
+
}
|
88 |
+
|
89 |
+
// `ListValue` is a wrapper around a repeated field of values.
|
90 |
+
//
|
91 |
+
// The JSON representation for `ListValue` is JSON array.
|
92 |
+
message ListValue {
|
93 |
+
// Repeated field of dynamically typed values.
|
94 |
+
repeated Value values = 1;
|
95 |
+
}
|
protoc/include/google/protobuf/timestamp.proto
ADDED
@@ -0,0 +1,147 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
36 |
+
option cc_enable_arenas = true;
|
37 |
+
option go_package = "google.golang.org/protobuf/types/known/timestamppb";
|
38 |
+
option java_package = "com.google.protobuf";
|
39 |
+
option java_outer_classname = "TimestampProto";
|
40 |
+
option java_multiple_files = true;
|
41 |
+
option objc_class_prefix = "GPB";
|
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 |
+
//
|
94 |
+
// Example 5: Compute Timestamp from Java `Instant.now()`.
|
95 |
+
//
|
96 |
+
// Instant now = Instant.now();
|
97 |
+
//
|
98 |
+
// Timestamp timestamp =
|
99 |
+
// Timestamp.newBuilder().setSeconds(now.getEpochSecond())
|
100 |
+
// .setNanos(now.getNano()).build();
|
101 |
+
//
|
102 |
+
//
|
103 |
+
// Example 6: Compute Timestamp from current time in Python.
|
104 |
+
//
|
105 |
+
// timestamp = Timestamp()
|
106 |
+
// timestamp.GetCurrentTime()
|
107 |
+
//
|
108 |
+
// # JSON Mapping
|
109 |
+
//
|
110 |
+
// In JSON format, the Timestamp type is encoded as a string in the
|
111 |
+
// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
|
112 |
+
// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
|
113 |
+
// where {year} is always expressed using four digits while {month}, {day},
|
114 |
+
// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
|
115 |
+
// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
|
116 |
+
// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
|
117 |
+
// is required. A proto3 JSON serializer should always use UTC (as indicated by
|
118 |
+
// "Z") when printing the Timestamp type and a proto3 JSON parser should be
|
119 |
+
// able to accept both UTC and other timezones (as indicated by an offset).
|
120 |
+
//
|
121 |
+
// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
|
122 |
+
// 01:30 UTC on January 15, 2017.
|
123 |
+
//
|
124 |
+
// In JavaScript, one can convert a Date object to this format using the
|
125 |
+
// standard
|
126 |
+
// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
|
127 |
+
// method. In Python, a standard `datetime.datetime` object can be converted
|
128 |
+
// to this format using
|
129 |
+
// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
|
130 |
+
// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
|
131 |
+
// the Joda Time's [`ISODateTimeFormat.dateTime()`](
|
132 |
+
// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
|
133 |
+
// ) to obtain a formatter capable of generating timestamps in this format.
|
134 |
+
//
|
135 |
+
//
|
136 |
+
message Timestamp {
|
137 |
+
// Represents seconds of UTC time since Unix epoch
|
138 |
+
// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
|
139 |
+
// 9999-12-31T23:59:59Z inclusive.
|
140 |
+
int64 seconds = 1;
|
141 |
+
|
142 |
+
// Non-negative fractions of a second at nanosecond resolution. Negative
|
143 |
+
// second values with fractions must still have non-negative nanos values
|
144 |
+
// that count forward in time. Must be from 0 to 999,999,999
|
145 |
+
// inclusive.
|
146 |
+
int32 nanos = 2;
|
147 |
+
}
|
protoc/include/google/protobuf/type.proto
ADDED
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
39 |
+
option cc_enable_arenas = true;
|
40 |
+
option java_package = "com.google.protobuf";
|
41 |
+
option java_outer_classname = "TypeProto";
|
42 |
+
option java_multiple_files = true;
|
43 |
+
option objc_class_prefix = "GPB";
|
44 |
+
option go_package = "google.golang.org/protobuf/types/known/typepb";
|
45 |
+
|
46 |
+
// A protocol buffer message type.
|
47 |
+
message Type {
|
48 |
+
// The fully qualified message name.
|
49 |
+
string name = 1;
|
50 |
+
// The list of fields.
|
51 |
+
repeated Field fields = 2;
|
52 |
+
// The list of types appearing in `oneof` definitions in this type.
|
53 |
+
repeated string oneofs = 3;
|
54 |
+
// The protocol buffer options.
|
55 |
+
repeated Option options = 4;
|
56 |
+
// The source context.
|
57 |
+
SourceContext source_context = 5;
|
58 |
+
// The source syntax.
|
59 |
+
Syntax syntax = 6;
|
60 |
+
}
|
61 |
+
|
62 |
+
// A single field of a message type.
|
63 |
+
message Field {
|
64 |
+
// Basic field types.
|
65 |
+
enum Kind {
|
66 |
+
// Field type unknown.
|
67 |
+
TYPE_UNKNOWN = 0;
|
68 |
+
// Field type double.
|
69 |
+
TYPE_DOUBLE = 1;
|
70 |
+
// Field type float.
|
71 |
+
TYPE_FLOAT = 2;
|
72 |
+
// Field type int64.
|
73 |
+
TYPE_INT64 = 3;
|
74 |
+
// Field type uint64.
|
75 |
+
TYPE_UINT64 = 4;
|
76 |
+
// Field type int32.
|
77 |
+
TYPE_INT32 = 5;
|
78 |
+
// Field type fixed64.
|
79 |
+
TYPE_FIXED64 = 6;
|
80 |
+
// Field type fixed32.
|
81 |
+
TYPE_FIXED32 = 7;
|
82 |
+
// Field type bool.
|
83 |
+
TYPE_BOOL = 8;
|
84 |
+
// Field type string.
|
85 |
+
TYPE_STRING = 9;
|
86 |
+
// Field type group. Proto2 syntax only, and deprecated.
|
87 |
+
TYPE_GROUP = 10;
|
88 |
+
// Field type message.
|
89 |
+
TYPE_MESSAGE = 11;
|
90 |
+
// Field type bytes.
|
91 |
+
TYPE_BYTES = 12;
|
92 |
+
// Field type uint32.
|
93 |
+
TYPE_UINT32 = 13;
|
94 |
+
// Field type enum.
|
95 |
+
TYPE_ENUM = 14;
|
96 |
+
// Field type sfixed32.
|
97 |
+
TYPE_SFIXED32 = 15;
|
98 |
+
// Field type sfixed64.
|
99 |
+
TYPE_SFIXED64 = 16;
|
100 |
+
// Field type sint32.
|
101 |
+
TYPE_SINT32 = 17;
|
102 |
+
// Field type sint64.
|
103 |
+
TYPE_SINT64 = 18;
|
104 |
+
}
|
105 |
+
|
106 |
+
// Whether a field is optional, required, or repeated.
|
107 |
+
enum Cardinality {
|
108 |
+
// For fields with unknown cardinality.
|
109 |
+
CARDINALITY_UNKNOWN = 0;
|
110 |
+
// For optional fields.
|
111 |
+
CARDINALITY_OPTIONAL = 1;
|
112 |
+
// For required fields. Proto2 syntax only.
|
113 |
+
CARDINALITY_REQUIRED = 2;
|
114 |
+
// For repeated fields.
|
115 |
+
CARDINALITY_REPEATED = 3;
|
116 |
+
}
|
117 |
+
|
118 |
+
// The field type.
|
119 |
+
Kind kind = 1;
|
120 |
+
// The field cardinality.
|
121 |
+
Cardinality cardinality = 2;
|
122 |
+
// The field number.
|
123 |
+
int32 number = 3;
|
124 |
+
// The field name.
|
125 |
+
string name = 4;
|
126 |
+
// The field type URL, without the scheme, for message or enumeration
|
127 |
+
// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
|
128 |
+
string type_url = 6;
|
129 |
+
// The index of the field type in `Type.oneofs`, for message or enumeration
|
130 |
+
// types. The first type has index 1; zero means the type is not in the list.
|
131 |
+
int32 oneof_index = 7;
|
132 |
+
// Whether to use alternative packed wire representation.
|
133 |
+
bool packed = 8;
|
134 |
+
// The protocol buffer options.
|
135 |
+
repeated Option options = 9;
|
136 |
+
// The field JSON name.
|
137 |
+
string json_name = 10;
|
138 |
+
// The string value of the default value of this field. Proto2 syntax only.
|
139 |
+
string default_value = 11;
|
140 |
+
}
|
141 |
+
|
142 |
+
// Enum type definition.
|
143 |
+
message Enum {
|
144 |
+
// Enum type name.
|
145 |
+
string name = 1;
|
146 |
+
// Enum value definitions.
|
147 |
+
repeated EnumValue enumvalue = 2;
|
148 |
+
// Protocol buffer options.
|
149 |
+
repeated Option options = 3;
|
150 |
+
// The source context.
|
151 |
+
SourceContext source_context = 4;
|
152 |
+
// The source syntax.
|
153 |
+
Syntax syntax = 5;
|
154 |
+
}
|
155 |
+
|
156 |
+
// Enum value definition.
|
157 |
+
message EnumValue {
|
158 |
+
// Enum value name.
|
159 |
+
string name = 1;
|
160 |
+
// Enum value number.
|
161 |
+
int32 number = 2;
|
162 |
+
// Protocol buffer options.
|
163 |
+
repeated Option options = 3;
|
164 |
+
}
|
165 |
+
|
166 |
+
// A protocol buffer option, which can be attached to a message, field,
|
167 |
+
// enumeration, etc.
|
168 |
+
message Option {
|
169 |
+
// The option's name. For protobuf built-in options (options defined in
|
170 |
+
// descriptor.proto), this is the short name. For example, `"map_entry"`.
|
171 |
+
// For custom options, it should be the fully-qualified name. For example,
|
172 |
+
// `"google.api.http"`.
|
173 |
+
string name = 1;
|
174 |
+
// The option's value packed in an Any message. If the value is a primitive,
|
175 |
+
// the corresponding wrapper type defined in google/protobuf/wrappers.proto
|
176 |
+
// should be used. If the value is an enum, it should be stored as an int32
|
177 |
+
// value using the google.protobuf.Int32Value type.
|
178 |
+
Any value = 2;
|
179 |
+
}
|
180 |
+
|
181 |
+
// The syntax in which a protocol buffer element is defined.
|
182 |
+
enum Syntax {
|
183 |
+
// Syntax `proto2`.
|
184 |
+
SYNTAX_PROTO2 = 0;
|
185 |
+
// Syntax `proto3`.
|
186 |
+
SYNTAX_PROTO3 = 1;
|
187 |
+
}
|
protoc/include/google/protobuf/wrappers.proto
ADDED
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
// Wrappers for primitive (non-message) types. These types are useful
|
32 |
+
// for embedding primitives in the `google.protobuf.Any` type and for places
|
33 |
+
// where we need to distinguish between the absence of a primitive
|
34 |
+
// typed field and its default value.
|
35 |
+
//
|
36 |
+
// These wrappers have no meaningful use within repeated fields as they lack
|
37 |
+
// the ability to detect presence on individual elements.
|
38 |
+
// These wrappers have no meaningful use within a map or a oneof since
|
39 |
+
// individual entries of a map or fields of a oneof can already detect presence.
|
40 |
+
|
41 |
+
syntax = "proto3";
|
42 |
+
|
43 |
+
package google.protobuf;
|
44 |
+
|
45 |
+
option csharp_namespace = "Google.Protobuf.WellKnownTypes";
|
46 |
+
option cc_enable_arenas = true;
|
47 |
+
option go_package = "google.golang.org/protobuf/types/known/wrapperspb";
|
48 |
+
option java_package = "com.google.protobuf";
|
49 |
+
option java_outer_classname = "WrappersProto";
|
50 |
+
option java_multiple_files = true;
|
51 |
+
option objc_class_prefix = "GPB";
|
52 |
+
|
53 |
+
// Wrapper message for `double`.
|
54 |
+
//
|
55 |
+
// The JSON representation for `DoubleValue` is JSON number.
|
56 |
+
message DoubleValue {
|
57 |
+
// The double value.
|
58 |
+
double value = 1;
|
59 |
+
}
|
60 |
+
|
61 |
+
// Wrapper message for `float`.
|
62 |
+
//
|
63 |
+
// The JSON representation for `FloatValue` is JSON number.
|
64 |
+
message FloatValue {
|
65 |
+
// The float value.
|
66 |
+
float value = 1;
|
67 |
+
}
|
68 |
+
|
69 |
+
// Wrapper message for `int64`.
|
70 |
+
//
|
71 |
+
// The JSON representation for `Int64Value` is JSON string.
|
72 |
+
message Int64Value {
|
73 |
+
// The int64 value.
|
74 |
+
int64 value = 1;
|
75 |
+
}
|
76 |
+
|
77 |
+
// Wrapper message for `uint64`.
|
78 |
+
//
|
79 |
+
// The JSON representation for `UInt64Value` is JSON string.
|
80 |
+
message UInt64Value {
|
81 |
+
// The uint64 value.
|
82 |
+
uint64 value = 1;
|
83 |
+
}
|
84 |
+
|
85 |
+
// Wrapper message for `int32`.
|
86 |
+
//
|
87 |
+
// The JSON representation for `Int32Value` is JSON number.
|
88 |
+
message Int32Value {
|
89 |
+
// The int32 value.
|
90 |
+
int32 value = 1;
|
91 |
+
}
|
92 |
+
|
93 |
+
// Wrapper message for `uint32`.
|
94 |
+
//
|
95 |
+
// The JSON representation for `UInt32Value` is JSON number.
|
96 |
+
message UInt32Value {
|
97 |
+
// The uint32 value.
|
98 |
+
uint32 value = 1;
|
99 |
+
}
|
100 |
+
|
101 |
+
// Wrapper message for `bool`.
|
102 |
+
//
|
103 |
+
// The JSON representation for `BoolValue` is JSON `true` and `false`.
|
104 |
+
message BoolValue {
|
105 |
+
// The bool value.
|
106 |
+
bool value = 1;
|
107 |
+
}
|
108 |
+
|
109 |
+
// Wrapper message for `string`.
|
110 |
+
//
|
111 |
+
// The JSON representation for `StringValue` is JSON string.
|
112 |
+
message StringValue {
|
113 |
+
// The string value.
|
114 |
+
string value = 1;
|
115 |
+
}
|
116 |
+
|
117 |
+
// Wrapper message for `bytes`.
|
118 |
+
//
|
119 |
+
// The JSON representation for `BytesValue` is JSON string.
|
120 |
+
message BytesValue {
|
121 |
+
// The bytes value.
|
122 |
+
bytes value = 1;
|
123 |
+
}
|
protoc/protoc-3.15.6-win64.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d4cd42275a32c3dbc194aa3c884a5b487688befcf5e03e5aa7837702a779ba30
|
3 |
+
size 1468733
|
protoc/readme.txt
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Protocol Buffers - Google's data interchange format
|
2 |
+
Copyright 2008 Google Inc.
|
3 |
+
https://developers.google.com/protocol-buffers/
|
4 |
+
|
5 |
+
This package contains a precompiled binary version of the protocol buffer
|
6 |
+
compiler (protoc). This binary is intended for users who want to use Protocol
|
7 |
+
Buffers in languages other than C++ but do not want to compile protoc
|
8 |
+
themselves. To install, simply place this binary somewhere in your PATH.
|
9 |
+
|
10 |
+
If you intend to use the included well known types then don't forget to
|
11 |
+
copy the contents of the 'include' directory somewhere as well, for example
|
12 |
+
into '/usr/local/include/'.
|
13 |
+
|
14 |
+
Please refer to our official github site for more installation instructions:
|
15 |
+
https://github.com/protocolbuffers/protobuf
|