grpc-tools 0.14.1 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/x86-linux/google/protobuf/any.proto +130 -0
- data/bin/x86-linux/google/protobuf/api.proto +202 -0
- data/bin/x86-linux/google/protobuf/compiler/plugin.proto +150 -0
- data/bin/x86-linux/google/protobuf/descriptor.proto +803 -0
- data/bin/x86-linux/google/protobuf/duration.proto +98 -0
- data/bin/x86-linux/google/protobuf/empty.proto +53 -0
- data/bin/x86-linux/google/protobuf/field_mask.proto +194 -0
- data/bin/x86-linux/google/protobuf/source_context.proto +48 -0
- data/bin/x86-linux/google/protobuf/struct.proto +96 -0
- data/bin/x86-linux/google/protobuf/timestamp.proto +111 -0
- data/bin/x86-linux/google/protobuf/type.proto +180 -0
- data/bin/x86-linux/google/protobuf/wrappers.proto +119 -0
- data/bin/x86-linux/grpc_ruby_plugin +0 -0
- data/bin/x86-linux/protoc +0 -0
- data/bin/x86-macos/google/protobuf/any.proto +130 -0
- data/bin/x86-macos/google/protobuf/api.proto +202 -0
- data/bin/x86-macos/google/protobuf/compiler/plugin.proto +150 -0
- data/bin/x86-macos/google/protobuf/descriptor.proto +803 -0
- data/bin/x86-macos/google/protobuf/duration.proto +98 -0
- data/bin/x86-macos/google/protobuf/empty.proto +53 -0
- data/bin/x86-macos/google/protobuf/field_mask.proto +194 -0
- data/bin/x86-macos/google/protobuf/source_context.proto +48 -0
- data/bin/x86-macos/google/protobuf/struct.proto +96 -0
- data/bin/x86-macos/google/protobuf/timestamp.proto +111 -0
- data/bin/x86-macos/google/protobuf/type.proto +180 -0
- data/bin/x86-macos/google/protobuf/wrappers.proto +119 -0
- data/bin/x86-macos/grpc_ruby_plugin +0 -0
- data/bin/x86-macos/protoc +0 -0
- data/bin/x86-windows/google/protobuf/any.proto +130 -0
- data/bin/x86-windows/google/protobuf/api.proto +202 -0
- data/bin/x86-windows/google/protobuf/compiler/plugin.proto +150 -0
- data/bin/x86-windows/google/protobuf/descriptor.proto +803 -0
- data/bin/x86-windows/google/protobuf/duration.proto +98 -0
- data/bin/x86-windows/google/protobuf/empty.proto +53 -0
- data/bin/x86-windows/google/protobuf/field_mask.proto +194 -0
- data/bin/x86-windows/google/protobuf/source_context.proto +48 -0
- data/bin/x86-windows/google/protobuf/struct.proto +96 -0
- data/bin/x86-windows/google/protobuf/timestamp.proto +111 -0
- data/bin/x86-windows/google/protobuf/type.proto +180 -0
- data/bin/x86-windows/google/protobuf/wrappers.proto +119 -0
- data/bin/x86-windows/grpc_ruby_plugin.exe +0 -0
- data/bin/x86-windows/protoc.exe +0 -0
- data/bin/x86_64-linux/google/protobuf/any.proto +130 -0
- data/bin/x86_64-linux/google/protobuf/api.proto +202 -0
- data/bin/x86_64-linux/google/protobuf/compiler/plugin.proto +150 -0
- data/bin/x86_64-linux/google/protobuf/descriptor.proto +803 -0
- data/bin/x86_64-linux/google/protobuf/duration.proto +98 -0
- data/bin/x86_64-linux/google/protobuf/empty.proto +53 -0
- data/bin/x86_64-linux/google/protobuf/field_mask.proto +194 -0
- data/bin/x86_64-linux/google/protobuf/source_context.proto +48 -0
- data/bin/x86_64-linux/google/protobuf/struct.proto +96 -0
- data/bin/x86_64-linux/google/protobuf/timestamp.proto +111 -0
- data/bin/x86_64-linux/google/protobuf/type.proto +180 -0
- data/bin/x86_64-linux/google/protobuf/wrappers.proto +119 -0
- data/bin/x86_64-linux/grpc_ruby_plugin +0 -0
- data/bin/x86_64-linux/protoc +0 -0
- data/bin/x86_64-macos/google/protobuf/any.proto +130 -0
- data/bin/x86_64-macos/google/protobuf/api.proto +202 -0
- data/bin/x86_64-macos/google/protobuf/compiler/plugin.proto +150 -0
- data/bin/x86_64-macos/google/protobuf/descriptor.proto +803 -0
- data/bin/x86_64-macos/google/protobuf/duration.proto +98 -0
- data/bin/x86_64-macos/google/protobuf/empty.proto +53 -0
- data/bin/x86_64-macos/google/protobuf/field_mask.proto +194 -0
- data/bin/x86_64-macos/google/protobuf/source_context.proto +48 -0
- data/bin/x86_64-macos/google/protobuf/struct.proto +96 -0
- data/bin/x86_64-macos/google/protobuf/timestamp.proto +111 -0
- data/bin/x86_64-macos/google/protobuf/type.proto +180 -0
- data/bin/x86_64-macos/google/protobuf/wrappers.proto +119 -0
- data/bin/x86_64-macos/grpc_ruby_plugin +0 -0
- data/bin/x86_64-macos/protoc +0 -0
- data/bin/x86_64-windows/google/protobuf/any.proto +130 -0
- data/bin/x86_64-windows/google/protobuf/api.proto +202 -0
- data/bin/x86_64-windows/google/protobuf/compiler/plugin.proto +150 -0
- data/bin/x86_64-windows/google/protobuf/descriptor.proto +803 -0
- data/bin/x86_64-windows/google/protobuf/duration.proto +98 -0
- data/bin/x86_64-windows/google/protobuf/empty.proto +53 -0
- data/bin/x86_64-windows/google/protobuf/field_mask.proto +194 -0
- data/bin/x86_64-windows/google/protobuf/source_context.proto +48 -0
- data/bin/x86_64-windows/google/protobuf/struct.proto +96 -0
- data/bin/x86_64-windows/google/protobuf/timestamp.proto +111 -0
- data/bin/x86_64-windows/google/protobuf/type.proto +180 -0
- data/bin/x86_64-windows/google/protobuf/wrappers.proto +119 -0
- data/bin/x86_64-windows/grpc_ruby_plugin.exe +0 -0
- data/bin/x86_64-windows/protoc.exe +0 -0
- data/version.rb +1 -1
- metadata +74 -2
@@ -0,0 +1,98 @@
|
|
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 = "github.com/golang/protobuf/ptypes/duration";
|
37
|
+
option java_package = "com.google.protobuf";
|
38
|
+
option java_outer_classname = "DurationProto";
|
39
|
+
option java_multiple_files = true;
|
40
|
+
option java_generate_equals_and_hash = 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
|
+
// Example 1: Compute Duration from two Timestamps in pseudo code.
|
51
|
+
//
|
52
|
+
// Timestamp start = ...;
|
53
|
+
// Timestamp end = ...;
|
54
|
+
// Duration duration = ...;
|
55
|
+
//
|
56
|
+
// duration.seconds = end.seconds - start.seconds;
|
57
|
+
// duration.nanos = end.nanos - start.nanos;
|
58
|
+
//
|
59
|
+
// if (duration.seconds < 0 && duration.nanos > 0) {
|
60
|
+
// duration.seconds += 1;
|
61
|
+
// duration.nanos -= 1000000000;
|
62
|
+
// } else if (durations.seconds > 0 && duration.nanos < 0) {
|
63
|
+
// duration.seconds -= 1;
|
64
|
+
// duration.nanos += 1000000000;
|
65
|
+
// }
|
66
|
+
//
|
67
|
+
// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
|
68
|
+
//
|
69
|
+
// Timestamp start = ...;
|
70
|
+
// Duration duration = ...;
|
71
|
+
// Timestamp end = ...;
|
72
|
+
//
|
73
|
+
// end.seconds = start.seconds + duration.seconds;
|
74
|
+
// end.nanos = start.nanos + duration.nanos;
|
75
|
+
//
|
76
|
+
// if (end.nanos < 0) {
|
77
|
+
// end.seconds -= 1;
|
78
|
+
// end.nanos += 1000000000;
|
79
|
+
// } else if (end.nanos >= 1000000000) {
|
80
|
+
// end.seconds += 1;
|
81
|
+
// end.nanos -= 1000000000;
|
82
|
+
// }
|
83
|
+
//
|
84
|
+
//
|
85
|
+
message Duration {
|
86
|
+
|
87
|
+
// Signed seconds of the span of time. Must be from -315,576,000,000
|
88
|
+
// to +315,576,000,000 inclusive.
|
89
|
+
int64 seconds = 1;
|
90
|
+
|
91
|
+
// Signed fractions of a second at nanosecond resolution of the span
|
92
|
+
// of time. Durations less than one second are represented with a 0
|
93
|
+
// `seconds` field and a positive or negative `nanos` field. For durations
|
94
|
+
// of one second or more, a non-zero value for the `nanos` field must be
|
95
|
+
// of the same sign as the `seconds` field. Must be from -999,999,999
|
96
|
+
// to +999,999,999 inclusive.
|
97
|
+
int32 nanos = 2;
|
98
|
+
}
|
@@ -0,0 +1,53 @@
|
|
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 = "github.com/golang/protobuf/ptypes/empty";
|
37
|
+
option java_package = "com.google.protobuf";
|
38
|
+
option java_outer_classname = "EmptyProto";
|
39
|
+
option java_multiple_files = true;
|
40
|
+
option java_generate_equals_and_hash = true;
|
41
|
+
option objc_class_prefix = "GPB";
|
42
|
+
option cc_enable_arenas = true;
|
43
|
+
|
44
|
+
// A generic empty message that you can re-use to avoid defining duplicated
|
45
|
+
// empty messages in your APIs. A typical example is to use it as the request
|
46
|
+
// or the response type of an API method. For instance:
|
47
|
+
//
|
48
|
+
// service Foo {
|
49
|
+
// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
50
|
+
// }
|
51
|
+
//
|
52
|
+
// The JSON representation for `Empty` is empty JSON object `{}`.
|
53
|
+
message Empty {}
|
@@ -0,0 +1,194 @@
|
|
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 java_generate_equals_and_hash = true;
|
41
|
+
|
42
|
+
// `FieldMask` represents a set of symbolic field paths, for example:
|
43
|
+
//
|
44
|
+
// paths: "f.a"
|
45
|
+
// paths: "f.b.d"
|
46
|
+
//
|
47
|
+
// Here `f` represents a field in some root message, `a` and `b`
|
48
|
+
// fields in the message found in `f`, and `d` a field found in the
|
49
|
+
// message in `f.b`.
|
50
|
+
//
|
51
|
+
// Field masks are used to specify a subset of fields that should be
|
52
|
+
// returned by a get operation or modified by an update operation.
|
53
|
+
// Field masks also have a custom JSON encoding (see below).
|
54
|
+
//
|
55
|
+
// # Field Masks in Projections
|
56
|
+
//
|
57
|
+
// When used in the context of a projection, a response message or
|
58
|
+
// sub-message is filtered by the API to only contain those fields as
|
59
|
+
// specified in the mask. For example, if the mask in the previous
|
60
|
+
// example is applied to a response message as follows:
|
61
|
+
//
|
62
|
+
// f {
|
63
|
+
// a : 22
|
64
|
+
// b {
|
65
|
+
// d : 1
|
66
|
+
// x : 2
|
67
|
+
// }
|
68
|
+
// y : 13
|
69
|
+
// }
|
70
|
+
// z: 8
|
71
|
+
//
|
72
|
+
// The result will not contain specific values for fields x,y and z
|
73
|
+
// (their value will be set to the default, and omitted in proto text
|
74
|
+
// output):
|
75
|
+
//
|
76
|
+
//
|
77
|
+
// f {
|
78
|
+
// a : 22
|
79
|
+
// b {
|
80
|
+
// d : 1
|
81
|
+
// }
|
82
|
+
// }
|
83
|
+
//
|
84
|
+
// A repeated field is not allowed except at the last position of a
|
85
|
+
// field mask.
|
86
|
+
//
|
87
|
+
// If a FieldMask object is not present in a get operation, the
|
88
|
+
// operation applies to all fields (as if a FieldMask of all fields
|
89
|
+
// had been specified).
|
90
|
+
//
|
91
|
+
// Note that a field mask does not necessarily apply to the
|
92
|
+
// top-level response message. In case of a REST get operation, the
|
93
|
+
// field mask applies directly to the response, but in case of a REST
|
94
|
+
// list operation, the mask instead applies to each individual message
|
95
|
+
// in the returned resource list. In case of a REST custom method,
|
96
|
+
// other definitions may be used. Where the mask applies will be
|
97
|
+
// clearly documented together with its declaration in the API. In
|
98
|
+
// any case, the effect on the returned resource/resources is required
|
99
|
+
// behavior for APIs.
|
100
|
+
//
|
101
|
+
// # Field Masks in Update Operations
|
102
|
+
//
|
103
|
+
// A field mask in update operations specifies which fields of the
|
104
|
+
// targeted resource are going to be updated. The API is required
|
105
|
+
// to only change the values of the fields as specified in the mask
|
106
|
+
// and leave the others untouched. If a resource is passed in to
|
107
|
+
// describe the updated values, the API ignores the values of all
|
108
|
+
// fields not covered by the mask.
|
109
|
+
//
|
110
|
+
// In order to reset a field's value to the default, the field must
|
111
|
+
// be in the mask and set to the default value in the provided resource.
|
112
|
+
// Hence, in order to reset all fields of a resource, provide a default
|
113
|
+
// instance of the resource and set all fields in the mask, or do
|
114
|
+
// not provide a mask as described below.
|
115
|
+
//
|
116
|
+
// If a field mask is not present on update, the operation applies to
|
117
|
+
// all fields (as if a field mask of all fields has been specified).
|
118
|
+
// Note that in the presence of schema evolution, this may mean that
|
119
|
+
// fields the client does not know and has therefore not filled into
|
120
|
+
// the request will be reset to their default. If this is unwanted
|
121
|
+
// behavior, a specific service may require a client to always specify
|
122
|
+
// a field mask, producing an error if not.
|
123
|
+
//
|
124
|
+
// As with get operations, the location of the resource which
|
125
|
+
// describes the updated values in the request message depends on the
|
126
|
+
// operation kind. In any case, the effect of the field mask is
|
127
|
+
// required to be honored by the API.
|
128
|
+
//
|
129
|
+
// ## Considerations for HTTP REST
|
130
|
+
//
|
131
|
+
// The HTTP kind of an update operation which uses a field mask must
|
132
|
+
// be set to PATCH instead of PUT in order to satisfy HTTP semantics
|
133
|
+
// (PUT must only be used for full updates).
|
134
|
+
//
|
135
|
+
// # JSON Encoding of Field Masks
|
136
|
+
//
|
137
|
+
// In JSON, a field mask is encoded as a single string where paths are
|
138
|
+
// separated by a comma. Fields name in each path are converted
|
139
|
+
// to/from lower-camel naming conventions.
|
140
|
+
//
|
141
|
+
// As an example, consider the following message declarations:
|
142
|
+
//
|
143
|
+
// message Profile {
|
144
|
+
// User user = 1;
|
145
|
+
// Photo photo = 2;
|
146
|
+
// }
|
147
|
+
// message User {
|
148
|
+
// string display_name = 1;
|
149
|
+
// string address = 2;
|
150
|
+
// }
|
151
|
+
//
|
152
|
+
// In proto a field mask for `Profile` may look as such:
|
153
|
+
//
|
154
|
+
// mask {
|
155
|
+
// paths: "user.display_name"
|
156
|
+
// paths: "photo"
|
157
|
+
// }
|
158
|
+
//
|
159
|
+
// In JSON, the same mask is represented as below:
|
160
|
+
//
|
161
|
+
// {
|
162
|
+
// mask: "user.displayName,photo"
|
163
|
+
// }
|
164
|
+
//
|
165
|
+
// # Field Masks and Oneof Fields
|
166
|
+
//
|
167
|
+
// Field masks treat fields in oneofs just as regular fields. Consider the
|
168
|
+
// following message:
|
169
|
+
//
|
170
|
+
// message SampleMessage {
|
171
|
+
// oneof test_oneof {
|
172
|
+
// string name = 4;
|
173
|
+
// SubMessage sub_message = 9;
|
174
|
+
// }
|
175
|
+
// }
|
176
|
+
//
|
177
|
+
// The field mask can be:
|
178
|
+
//
|
179
|
+
// mask {
|
180
|
+
// paths: "name"
|
181
|
+
// }
|
182
|
+
//
|
183
|
+
// Or:
|
184
|
+
//
|
185
|
+
// mask {
|
186
|
+
// paths: "sub_message"
|
187
|
+
// }
|
188
|
+
//
|
189
|
+
// Note that oneof type names ("test_oneof" in this case) cannot be used in
|
190
|
+
// paths.
|
191
|
+
message FieldMask {
|
192
|
+
// The set of field mask paths.
|
193
|
+
repeated string paths = 1;
|
194
|
+
}
|
@@ -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 java_generate_equals_and_hash = true;
|
40
|
+
option objc_class_prefix = "GPB";
|
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.proto"`.
|
47
|
+
string file_name = 1;
|
48
|
+
}
|
@@ -0,0 +1,96 @@
|
|
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 = "github.com/golang/protobuf/ptypes/struct;structpb";
|
37
|
+
option java_package = "com.google.protobuf";
|
38
|
+
option java_outer_classname = "StructProto";
|
39
|
+
option java_multiple_files = true;
|
40
|
+
option java_generate_equals_and_hash = true;
|
41
|
+
option objc_class_prefix = "GPB";
|
42
|
+
|
43
|
+
|
44
|
+
// `Struct` represents a structured data value, consisting of fields
|
45
|
+
// which map to dynamically typed values. In some languages, `Struct`
|
46
|
+
// might be supported by a native representation. For example, in
|
47
|
+
// scripting languages like JS a struct is represented as an
|
48
|
+
// object. The details of that representation are described together
|
49
|
+
// with the proto support for the language.
|
50
|
+
//
|
51
|
+
// The JSON representation for `Struct` is JSON object.
|
52
|
+
message Struct {
|
53
|
+
// Unordered map of dynamically typed values.
|
54
|
+
map<string, Value> fields = 1;
|
55
|
+
}
|
56
|
+
|
57
|
+
// `Value` represents a dynamically typed value which can be either
|
58
|
+
// null, a number, a string, a boolean, a recursive struct value, or a
|
59
|
+
// list of values. A producer of value is expected to set one of that
|
60
|
+
// variants, absence of any variant indicates an error.
|
61
|
+
//
|
62
|
+
// The JSON representation for `Value` is JSON value.
|
63
|
+
message Value {
|
64
|
+
// The kind of value.
|
65
|
+
oneof kind {
|
66
|
+
// Represents a null value.
|
67
|
+
NullValue null_value = 1;
|
68
|
+
// Represents a double value.
|
69
|
+
double number_value = 2;
|
70
|
+
// Represents a string value.
|
71
|
+
string string_value = 3;
|
72
|
+
// Represents a boolean value.
|
73
|
+
bool bool_value = 4;
|
74
|
+
// Represents a structured value.
|
75
|
+
Struct struct_value = 5;
|
76
|
+
// Represents a repeated `Value`.
|
77
|
+
ListValue list_value = 6;
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
// `NullValue` is a singleton enumeration to represent the null value for the
|
82
|
+
// `Value` type union.
|
83
|
+
//
|
84
|
+
// The JSON representation for `NullValue` is JSON `null`.
|
85
|
+
enum NullValue {
|
86
|
+
// Null value.
|
87
|
+
NULL_VALUE = 0;
|
88
|
+
}
|
89
|
+
|
90
|
+
// `ListValue` is a wrapper around a repeated field of values.
|
91
|
+
//
|
92
|
+
// The JSON representation for `ListValue` is JSON array.
|
93
|
+
message ListValue {
|
94
|
+
// Repeated field of dynamically typed values.
|
95
|
+
repeated Value values = 1;
|
96
|
+
}
|