googleapis-common-protos-types 1.7.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/lib/google/api/annotations_pb.rb +60 -2
  4. data/lib/google/api/auth_pb.rb +264 -34
  5. data/lib/google/api/backend_pb.rb +212 -23
  6. data/lib/google/api/billing_pb.rb +104 -8
  7. data/lib/google/api/client_pb.rb +422 -86
  8. data/lib/google/api/config_change_pb.rb +111 -17
  9. data/lib/google/api/consumer_pb.rb +109 -16
  10. data/lib/google/api/context_pb.rb +117 -11
  11. data/lib/google/api/control_pb.rb +71 -4
  12. data/lib/google/api/distribution_pb.rb +242 -39
  13. data/lib/google/api/documentation_pb.rb +195 -19
  14. data/lib/google/api/endpoint_pb.rb +100 -7
  15. data/lib/google/api/error_reason_pb.rb +597 -33
  16. data/lib/google/api/field_behavior_pb.rb +131 -11
  17. data/lib/google/api/http_pb.rb +406 -23
  18. data/lib/google/api/httpbody_pb.rb +109 -6
  19. data/lib/google/api/label_pb.rb +75 -11
  20. data/lib/google/api/launch_stage_pb.rb +99 -11
  21. data/lib/google/api/log_pb.rb +82 -7
  22. data/lib/google/api/logging_pb.rb +108 -9
  23. data/lib/google/api/metric_pb.rb +297 -38
  24. data/lib/google/api/monitored_resource_pb.rb +159 -17
  25. data/lib/google/api/monitoring_pb.rb +134 -9
  26. data/lib/google/api/policy_pb.rb +129 -0
  27. data/lib/google/api/quota_pb.rb +211 -21
  28. data/lib/google/api/resource_pb.rb +265 -23
  29. data/lib/google/api/routing_pb.rb +488 -8
  30. data/lib/google/api/service_pb.rb +239 -29
  31. data/lib/google/api/source_info_pb.rb +59 -4
  32. data/lib/google/api/system_parameter_pb.rb +123 -13
  33. data/lib/google/api/usage_pb.rb +123 -11
  34. data/lib/google/api/visibility_pb.rb +140 -8
  35. data/lib/google/logging/type/http_request_pb.rb +123 -18
  36. data/lib/google/logging/type/log_severity_pb.rb +98 -12
  37. data/lib/google/longrunning/operations_pb.rb +277 -37
  38. data/lib/google/rpc/code_pb.rb +213 -20
  39. data/lib/google/rpc/context/attribute_context_pb.rb +375 -66
  40. data/lib/google/rpc/context/audit_context_pb.rb +77 -8
  41. data/lib/google/rpc/error_details_pb.rb +313 -56
  42. data/lib/google/rpc/http_pb.rb +91 -17
  43. data/lib/google/rpc/status_pb.rb +77 -6
  44. data/lib/google/type/calendar_period_pb.rb +83 -11
  45. data/lib/google/type/color_pb.rb +202 -7
  46. data/lib/google/type/date_pb.rb +79 -6
  47. data/lib/google/type/datetime_pb.rb +132 -18
  48. data/lib/google/type/dayofweek_pb.rb +77 -11
  49. data/lib/google/type/decimal_pb.rb +122 -4
  50. data/lib/google/type/expr_pb.rb +100 -7
  51. data/lib/google/type/fraction_pb.rb +60 -5
  52. data/lib/google/type/interval_pb.rb +74 -5
  53. data/lib/google/type/latlng_pb.rb +64 -5
  54. data/lib/google/type/localized_text_pb.rb +63 -5
  55. data/lib/google/type/money_pb.rb +69 -6
  56. data/lib/google/type/month_pb.rb +92 -16
  57. data/lib/google/type/phone_number_pb.rb +140 -12
  58. data/lib/google/type/postal_address_pb.rb +161 -14
  59. data/lib/google/type/quaternion_pb.rb +121 -7
  60. data/lib/google/type/timeofday_pb.rb +71 -7
  61. data/lib/googleapis/common/protos/types/version.rb +1 -1
  62. metadata +6 -5
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/api/field_behavior.proto
3
4
 
@@ -5,19 +6,31 @@ require 'google/protobuf'
5
6
 
6
7
  require 'google/protobuf/descriptor_pb'
7
8
 
8
- Google::Protobuf::DescriptorPool.generated_pool.build do
9
- add_file("google/api/field_behavior.proto", :syntax => :proto3) do
10
- add_enum "google.api.FieldBehavior" do
11
- value :FIELD_BEHAVIOR_UNSPECIFIED, 0
12
- value :OPTIONAL, 1
13
- value :REQUIRED, 2
14
- value :OUTPUT_ONLY, 3
15
- value :INPUT_ONLY, 4
16
- value :IMMUTABLE, 5
17
- value :UNORDERED_LIST, 6
18
- value :NON_EMPTY_DEFAULT, 7
9
+
10
+ descriptor_data = "\n\x1fgoogle/api/field_behavior.proto\x12\ngoogle.api\x1a google/protobuf/descriptor.proto*\xb6\x01\n\rFieldBehavior\x12\x1e\n\x1a\x46IELD_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08OPTIONAL\x10\x01\x12\x0c\n\x08REQUIRED\x10\x02\x12\x0f\n\x0bOUTPUT_ONLY\x10\x03\x12\x0e\n\nINPUT_ONLY\x10\x04\x12\r\n\tIMMUTABLE\x10\x05\x12\x12\n\x0eUNORDERED_LIST\x10\x06\x12\x15\n\x11NON_EMPTY_DEFAULT\x10\x07\x12\x0e\n\nIDENTIFIER\x10\x08:Q\n\x0e\x66ield_behavior\x12\x1d.google.protobuf.FieldOptions\x18\x9c\x08 \x03(\x0e\x32\x19.google.api.FieldBehaviorBp\n\x0e\x63om.google.apiB\x12\x46ieldBehaviorProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError => e
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ]
26
+ imports.each do |type_name, expected_filename|
27
+ import_file = pool.lookup(type_name).file_descriptor
28
+ if import_file.name != expected_filename
29
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
19
30
  end
20
31
  end
32
+ warn "Each proto file must use a consistent fully-qualified name."
33
+ warn "This will become an error in the next major version."
21
34
  end
22
35
 
23
36
  module Google
@@ -25,3 +38,110 @@ module Google
25
38
  FieldBehavior = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.FieldBehavior").enummodule
26
39
  end
27
40
  end
41
+
42
+ #### Source proto file: google/api/field_behavior.proto ####
43
+ #
44
+ # // Copyright 2023 Google LLC
45
+ # //
46
+ # // Licensed under the Apache License, Version 2.0 (the "License");
47
+ # // you may not use this file except in compliance with the License.
48
+ # // You may obtain a copy of the License at
49
+ # //
50
+ # // http://www.apache.org/licenses/LICENSE-2.0
51
+ # //
52
+ # // Unless required by applicable law or agreed to in writing, software
53
+ # // distributed under the License is distributed on an "AS IS" BASIS,
54
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
55
+ # // See the License for the specific language governing permissions and
56
+ # // limitations under the License.
57
+ #
58
+ # syntax = "proto3";
59
+ #
60
+ # package google.api;
61
+ #
62
+ # import "google/protobuf/descriptor.proto";
63
+ #
64
+ # option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
65
+ # option java_multiple_files = true;
66
+ # option java_outer_classname = "FieldBehaviorProto";
67
+ # option java_package = "com.google.api";
68
+ # option objc_class_prefix = "GAPI";
69
+ #
70
+ # extend google.protobuf.FieldOptions {
71
+ # // A designation of a specific field behavior (required, output only, etc.)
72
+ # // in protobuf messages.
73
+ # //
74
+ # // Examples:
75
+ # //
76
+ # // string name = 1 [(google.api.field_behavior) = REQUIRED];
77
+ # // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
78
+ # // google.protobuf.Duration ttl = 1
79
+ # // [(google.api.field_behavior) = INPUT_ONLY];
80
+ # // google.protobuf.Timestamp expire_time = 1
81
+ # // [(google.api.field_behavior) = OUTPUT_ONLY,
82
+ # // (google.api.field_behavior) = IMMUTABLE];
83
+ # repeated google.api.FieldBehavior field_behavior = 1052;
84
+ # }
85
+ #
86
+ # // An indicator of the behavior of a given field (for example, that a field
87
+ # // is required in requests, or given as output but ignored as input).
88
+ # // This **does not** change the behavior in protocol buffers itself; it only
89
+ # // denotes the behavior and may affect how API tooling handles the field.
90
+ # //
91
+ # // Note: This enum **may** receive new values in the future.
92
+ # enum FieldBehavior {
93
+ # // Conventional default for enums. Do not use this.
94
+ # FIELD_BEHAVIOR_UNSPECIFIED = 0;
95
+ #
96
+ # // Specifically denotes a field as optional.
97
+ # // While all fields in protocol buffers are optional, this may be specified
98
+ # // for emphasis if appropriate.
99
+ # OPTIONAL = 1;
100
+ #
101
+ # // Denotes a field as required.
102
+ # // This indicates that the field **must** be provided as part of the request,
103
+ # // and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
104
+ # REQUIRED = 2;
105
+ #
106
+ # // Denotes a field as output only.
107
+ # // This indicates that the field is provided in responses, but including the
108
+ # // field in a request does nothing (the server *must* ignore it and
109
+ # // *must not* throw an error as a result of the field's presence).
110
+ # OUTPUT_ONLY = 3;
111
+ #
112
+ # // Denotes a field as input only.
113
+ # // This indicates that the field is provided in requests, and the
114
+ # // corresponding field is not included in output.
115
+ # INPUT_ONLY = 4;
116
+ #
117
+ # // Denotes a field as immutable.
118
+ # // This indicates that the field may be set once in a request to create a
119
+ # // resource, but may not be changed thereafter.
120
+ # IMMUTABLE = 5;
121
+ #
122
+ # // Denotes that a (repeated) field is an unordered list.
123
+ # // This indicates that the service may provide the elements of the list
124
+ # // in any arbitrary order, rather than the order the user originally
125
+ # // provided. Additionally, the list's order may or may not be stable.
126
+ # UNORDERED_LIST = 6;
127
+ #
128
+ # // Denotes that this field returns a non-empty default value if not set.
129
+ # // This indicates that if the user provides the empty value in a request,
130
+ # // a non-empty value will be returned. The user will not be aware of what
131
+ # // non-empty value to expect.
132
+ # NON_EMPTY_DEFAULT = 7;
133
+ #
134
+ # // Denotes that the field in a resource (a message annotated with
135
+ # // google.api.resource) is used in the resource name to uniquely identify the
136
+ # // resource. For AIP-compliant APIs, this should only be applied to the
137
+ # // `name` field on the resource.
138
+ # //
139
+ # // This behavior should not be applied to references to other resources within
140
+ # // the message.
141
+ # //
142
+ # // The identifier field of resources often have different field behavior
143
+ # // depending on the request it is embedded in (e.g. for Create methods name
144
+ # // is optional and unused, while for Update methods it is required). Instead
145
+ # // of method-specific annotations, only `IDENTIFIER` is required.
146
+ # IDENTIFIER = 8;
147
+ # }
@@ -1,33 +1,34 @@
1
+ # frozen_string_literal: true
1
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
3
  # source: google/api/http.proto
3
4
 
4
5
  require 'google/protobuf'
5
6
 
6
- Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_file("google/api/http.proto", :syntax => :proto3) do
8
- add_message "google.api.Http" do
9
- repeated :rules, :message, 1, "google.api.HttpRule"
10
- optional :fully_decode_reserved_expansion, :bool, 2
11
- end
12
- add_message "google.api.HttpRule" do
13
- optional :selector, :string, 1
14
- optional :body, :string, 7
15
- optional :response_body, :string, 12
16
- repeated :additional_bindings, :message, 11, "google.api.HttpRule"
17
- oneof :pattern do
18
- optional :get, :string, 2
19
- optional :put, :string, 3
20
- optional :post, :string, 4
21
- optional :delete, :string, 5
22
- optional :patch, :string, 6
23
- optional :custom, :message, 8, "google.api.CustomHttpPattern"
24
- end
25
- end
26
- add_message "google.api.CustomHttpPattern" do
27
- optional :kind, :string, 1
28
- optional :path, :string, 2
7
+
8
+ descriptor_data = "\n\x15google/api/http.proto\x12\ngoogle.api\"T\n\x04Http\x12#\n\x05rules\x18\x01 \x03(\x0b\x32\x14.google.api.HttpRule\x12\'\n\x1f\x66ully_decode_reserved_expansion\x18\x02 \x01(\x08\"\x81\x02\n\x08HttpRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12\r\n\x03get\x18\x02 \x01(\tH\x00\x12\r\n\x03put\x18\x03 \x01(\tH\x00\x12\x0e\n\x04post\x18\x04 \x01(\tH\x00\x12\x10\n\x06\x64\x65lete\x18\x05 \x01(\tH\x00\x12\x0f\n\x05patch\x18\x06 \x01(\tH\x00\x12/\n\x06\x63ustom\x18\x08 \x01(\x0b\x32\x1d.google.api.CustomHttpPatternH\x00\x12\x0c\n\x04\x62ody\x18\x07 \x01(\t\x12\x15\n\rresponse_body\x18\x0c \x01(\t\x12\x31\n\x13\x61\x64\x64itional_bindings\x18\x0b \x03(\x0b\x32\x14.google.api.HttpRuleB\t\n\x07pattern\"/\n\x11\x43ustomHttpPattern\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\tBj\n\x0e\x63om.google.apiB\tHttpProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xf8\x01\x01\xa2\x02\x04GAPIb\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+
12
+ begin
13
+ pool.add_serialized_file(descriptor_data)
14
+ rescue TypeError => e
15
+ # Compatibility code: will be removed in the next major version.
16
+ require 'google/protobuf/descriptor_pb'
17
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
+ parsed.clear_dependency
19
+ serialized = parsed.class.encode(parsed)
20
+ file = pool.add_serialized_file(serialized)
21
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
+ imports = [
23
+ ]
24
+ imports.each do |type_name, expected_filename|
25
+ import_file = pool.lookup(type_name).file_descriptor
26
+ if import_file.name != expected_filename
27
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
29
28
  end
30
29
  end
30
+ warn "Each proto file must use a consistent fully-qualified name."
31
+ warn "This will become an error in the next major version."
31
32
  end
32
33
 
33
34
  module Google
@@ -37,3 +38,385 @@ module Google
37
38
  CustomHttpPattern = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.CustomHttpPattern").msgclass
38
39
  end
39
40
  end
41
+
42
+ #### Source proto file: google/api/http.proto ####
43
+ #
44
+ # // Copyright 2023 Google LLC
45
+ # //
46
+ # // Licensed under the Apache License, Version 2.0 (the "License");
47
+ # // you may not use this file except in compliance with the License.
48
+ # // You may obtain a copy of the License at
49
+ # //
50
+ # // http://www.apache.org/licenses/LICENSE-2.0
51
+ # //
52
+ # // Unless required by applicable law or agreed to in writing, software
53
+ # // distributed under the License is distributed on an "AS IS" BASIS,
54
+ # // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
55
+ # // See the License for the specific language governing permissions and
56
+ # // limitations under the License.
57
+ #
58
+ # syntax = "proto3";
59
+ #
60
+ # package google.api;
61
+ #
62
+ # option cc_enable_arenas = true;
63
+ # option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
64
+ # option java_multiple_files = true;
65
+ # option java_outer_classname = "HttpProto";
66
+ # option java_package = "com.google.api";
67
+ # option objc_class_prefix = "GAPI";
68
+ #
69
+ # // Defines the HTTP configuration for an API service. It contains a list of
70
+ # // [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method
71
+ # // to one or more HTTP REST API methods.
72
+ # message Http {
73
+ # // A list of HTTP configuration rules that apply to individual API methods.
74
+ # //
75
+ # // **NOTE:** All service configuration rules follow "last one wins" order.
76
+ # repeated HttpRule rules = 1;
77
+ #
78
+ # // When set to true, URL path parameters will be fully URI-decoded except in
79
+ # // cases of single segment matches in reserved expansion, where "%2F" will be
80
+ # // left encoded.
81
+ # //
82
+ # // The default behavior is to not decode RFC 6570 reserved characters in multi
83
+ # // segment matches.
84
+ # bool fully_decode_reserved_expansion = 2;
85
+ # }
86
+ #
87
+ # // # gRPC Transcoding
88
+ # //
89
+ # // gRPC Transcoding is a feature for mapping between a gRPC method and one or
90
+ # // more HTTP REST endpoints. It allows developers to build a single API service
91
+ # // that supports both gRPC APIs and REST APIs. Many systems, including [Google
92
+ # // APIs](https://github.com/googleapis/googleapis),
93
+ # // [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC
94
+ # // Gateway](https://github.com/grpc-ecosystem/grpc-gateway),
95
+ # // and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature
96
+ # // and use it for large scale production services.
97
+ # //
98
+ # // `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies
99
+ # // how different portions of the gRPC request message are mapped to the URL
100
+ # // path, URL query parameters, and HTTP request body. It also controls how the
101
+ # // gRPC response message is mapped to the HTTP response body. `HttpRule` is
102
+ # // typically specified as an `google.api.http` annotation on the gRPC method.
103
+ # //
104
+ # // Each mapping specifies a URL path template and an HTTP method. The path
105
+ # // template may refer to one or more fields in the gRPC request message, as long
106
+ # // as each field is a non-repeated field with a primitive (non-message) type.
107
+ # // The path template controls how fields of the request message are mapped to
108
+ # // the URL path.
109
+ # //
110
+ # // Example:
111
+ # //
112
+ # // service Messaging {
113
+ # // rpc GetMessage(GetMessageRequest) returns (Message) {
114
+ # // option (google.api.http) = {
115
+ # // get: "/v1/{name=messages/*}"
116
+ # // };
117
+ # // }
118
+ # // }
119
+ # // message GetMessageRequest {
120
+ # // string name = 1; // Mapped to URL path.
121
+ # // }
122
+ # // message Message {
123
+ # // string text = 1; // The resource content.
124
+ # // }
125
+ # //
126
+ # // This enables an HTTP REST to gRPC mapping as below:
127
+ # //
128
+ # // HTTP | gRPC
129
+ # // -----|-----
130
+ # // `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")`
131
+ # //
132
+ # // Any fields in the request message which are not bound by the path template
133
+ # // automatically become HTTP query parameters if there is no HTTP request body.
134
+ # // For example:
135
+ # //
136
+ # // service Messaging {
137
+ # // rpc GetMessage(GetMessageRequest) returns (Message) {
138
+ # // option (google.api.http) = {
139
+ # // get:"/v1/messages/{message_id}"
140
+ # // };
141
+ # // }
142
+ # // }
143
+ # // message GetMessageRequest {
144
+ # // message SubMessage {
145
+ # // string subfield = 1;
146
+ # // }
147
+ # // string message_id = 1; // Mapped to URL path.
148
+ # // int64 revision = 2; // Mapped to URL query parameter `revision`.
149
+ # // SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`.
150
+ # // }
151
+ # //
152
+ # // This enables a HTTP JSON to RPC mapping as below:
153
+ # //
154
+ # // HTTP | gRPC
155
+ # // -----|-----
156
+ # // `GET /v1/messages/123456?revision=2&sub.subfield=foo` |
157
+ # // `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield:
158
+ # // "foo"))`
159
+ # //
160
+ # // Note that fields which are mapped to URL query parameters must have a
161
+ # // primitive type or a repeated primitive type or a non-repeated message type.
162
+ # // In the case of a repeated type, the parameter can be repeated in the URL
163
+ # // as `...?param=A&param=B`. In the case of a message type, each field of the
164
+ # // message is mapped to a separate parameter, such as
165
+ # // `...?foo.a=A&foo.b=B&foo.c=C`.
166
+ # //
167
+ # // For HTTP methods that allow a request body, the `body` field
168
+ # // specifies the mapping. Consider a REST update method on the
169
+ # // message resource collection:
170
+ # //
171
+ # // service Messaging {
172
+ # // rpc UpdateMessage(UpdateMessageRequest) returns (Message) {
173
+ # // option (google.api.http) = {
174
+ # // patch: "/v1/messages/{message_id}"
175
+ # // body: "message"
176
+ # // };
177
+ # // }
178
+ # // }
179
+ # // message UpdateMessageRequest {
180
+ # // string message_id = 1; // mapped to the URL
181
+ # // Message message = 2; // mapped to the body
182
+ # // }
183
+ # //
184
+ # // The following HTTP JSON to RPC mapping is enabled, where the
185
+ # // representation of the JSON in the request body is determined by
186
+ # // protos JSON encoding:
187
+ # //
188
+ # // HTTP | gRPC
189
+ # // -----|-----
190
+ # // `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
191
+ # // "123456" message { text: "Hi!" })`
192
+ # //
193
+ # // The special name `*` can be used in the body mapping to define that
194
+ # // every field not bound by the path template should be mapped to the
195
+ # // request body. This enables the following alternative definition of
196
+ # // the update method:
197
+ # //
198
+ # // service Messaging {
199
+ # // rpc UpdateMessage(Message) returns (Message) {
200
+ # // option (google.api.http) = {
201
+ # // patch: "/v1/messages/{message_id}"
202
+ # // body: "*"
203
+ # // };
204
+ # // }
205
+ # // }
206
+ # // message Message {
207
+ # // string message_id = 1;
208
+ # // string text = 2;
209
+ # // }
210
+ # //
211
+ # //
212
+ # // The following HTTP JSON to RPC mapping is enabled:
213
+ # //
214
+ # // HTTP | gRPC
215
+ # // -----|-----
216
+ # // `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id:
217
+ # // "123456" text: "Hi!")`
218
+ # //
219
+ # // Note that when using `*` in the body mapping, it is not possible to
220
+ # // have HTTP parameters, as all fields not bound by the path end in
221
+ # // the body. This makes this option more rarely used in practice when
222
+ # // defining REST APIs. The common usage of `*` is in custom methods
223
+ # // which don't use the URL at all for transferring data.
224
+ # //
225
+ # // It is possible to define multiple HTTP methods for one RPC by using
226
+ # // the `additional_bindings` option. Example:
227
+ # //
228
+ # // service Messaging {
229
+ # // rpc GetMessage(GetMessageRequest) returns (Message) {
230
+ # // option (google.api.http) = {
231
+ # // get: "/v1/messages/{message_id}"
232
+ # // additional_bindings {
233
+ # // get: "/v1/users/{user_id}/messages/{message_id}"
234
+ # // }
235
+ # // };
236
+ # // }
237
+ # // }
238
+ # // message GetMessageRequest {
239
+ # // string message_id = 1;
240
+ # // string user_id = 2;
241
+ # // }
242
+ # //
243
+ # // This enables the following two alternative HTTP JSON to RPC mappings:
244
+ # //
245
+ # // HTTP | gRPC
246
+ # // -----|-----
247
+ # // `GET /v1/messages/123456` | `GetMessage(message_id: "123456")`
248
+ # // `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id:
249
+ # // "123456")`
250
+ # //
251
+ # // ## Rules for HTTP mapping
252
+ # //
253
+ # // 1. Leaf request fields (recursive expansion nested messages in the request
254
+ # // message) are classified into three categories:
255
+ # // - Fields referred by the path template. They are passed via the URL path.
256
+ # // - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They
257
+ # // are passed via the HTTP
258
+ # // request body.
259
+ # // - All other fields are passed via the URL query parameters, and the
260
+ # // parameter name is the field path in the request message. A repeated
261
+ # // field can be represented as multiple query parameters under the same
262
+ # // name.
263
+ # // 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL
264
+ # // query parameter, all fields
265
+ # // are passed via URL path and HTTP request body.
266
+ # // 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP
267
+ # // request body, all
268
+ # // fields are passed via URL path and URL query parameters.
269
+ # //
270
+ # // ### Path template syntax
271
+ # //
272
+ # // Template = "/" Segments [ Verb ] ;
273
+ # // Segments = Segment { "/" Segment } ;
274
+ # // Segment = "*" | "**" | LITERAL | Variable ;
275
+ # // Variable = "{" FieldPath [ "=" Segments ] "}" ;
276
+ # // FieldPath = IDENT { "." IDENT } ;
277
+ # // Verb = ":" LITERAL ;
278
+ # //
279
+ # // The syntax `*` matches a single URL path segment. The syntax `**` matches
280
+ # // zero or more URL path segments, which must be the last part of the URL path
281
+ # // except the `Verb`.
282
+ # //
283
+ # // The syntax `Variable` matches part of the URL path as specified by its
284
+ # // template. A variable template must not contain other variables. If a variable
285
+ # // matches a single path segment, its template may be omitted, e.g. `{var}`
286
+ # // is equivalent to `{var=*}`.
287
+ # //
288
+ # // The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL`
289
+ # // contains any reserved character, such characters should be percent-encoded
290
+ # // before the matching.
291
+ # //
292
+ # // If a variable contains exactly one path segment, such as `"{var}"` or
293
+ # // `"{var=*}"`, when such a variable is expanded into a URL path on the client
294
+ # // side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The
295
+ # // server side does the reverse decoding. Such variables show up in the
296
+ # // [Discovery
297
+ # // Document](https://developers.google.com/discovery/v1/reference/apis) as
298
+ # // `{var}`.
299
+ # //
300
+ # // If a variable contains multiple path segments, such as `"{var=foo/*}"`
301
+ # // or `"{var=**}"`, when such a variable is expanded into a URL path on the
302
+ # // client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded.
303
+ # // The server side does the reverse decoding, except "%2F" and "%2f" are left
304
+ # // unchanged. Such variables show up in the
305
+ # // [Discovery
306
+ # // Document](https://developers.google.com/discovery/v1/reference/apis) as
307
+ # // `{+var}`.
308
+ # //
309
+ # // ## Using gRPC API Service Configuration
310
+ # //
311
+ # // gRPC API Service Configuration (service config) is a configuration language
312
+ # // for configuring a gRPC service to become a user-facing product. The
313
+ # // service config is simply the YAML representation of the `google.api.Service`
314
+ # // proto message.
315
+ # //
316
+ # // As an alternative to annotating your proto file, you can configure gRPC
317
+ # // transcoding in your service config YAML files. You do this by specifying a
318
+ # // `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same
319
+ # // effect as the proto annotation. This can be particularly useful if you
320
+ # // have a proto that is reused in multiple services. Note that any transcoding
321
+ # // specified in the service config will override any matching transcoding
322
+ # // configuration in the proto.
323
+ # //
324
+ # // Example:
325
+ # //
326
+ # // http:
327
+ # // rules:
328
+ # // # Selects a gRPC method and applies HttpRule to it.
329
+ # // - selector: example.v1.Messaging.GetMessage
330
+ # // get: /v1/messages/{message_id}/{sub.subfield}
331
+ # //
332
+ # // ## Special notes
333
+ # //
334
+ # // When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the
335
+ # // proto to JSON conversion must follow the [proto3
336
+ # // specification](https://developers.google.com/protocol-buffers/docs/proto3#json).
337
+ # //
338
+ # // While the single segment variable follows the semantics of
339
+ # // [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String
340
+ # // Expansion, the multi segment variable **does not** follow RFC 6570 Section
341
+ # // 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion
342
+ # // does not expand special characters like `?` and `#`, which would lead
343
+ # // to invalid URLs. As the result, gRPC Transcoding uses a custom encoding
344
+ # // for multi segment variables.
345
+ # //
346
+ # // The path variables **must not** refer to any repeated or mapped field,
347
+ # // because client libraries are not capable of handling such variable expansion.
348
+ # //
349
+ # // The path variables **must not** capture the leading "/" character. The reason
350
+ # // is that the most common use case "{var}" does not capture the leading "/"
351
+ # // character. For consistency, all path variables must share the same behavior.
352
+ # //
353
+ # // Repeated message fields must not be mapped to URL query parameters, because
354
+ # // no client library can support such complicated mapping.
355
+ # //
356
+ # // If an API needs to use a JSON array for request or response body, it can map
357
+ # // the request or response body to a repeated field. However, some gRPC
358
+ # // Transcoding implementations may not support this feature.
359
+ # message HttpRule {
360
+ # // Selects a method to which this rule applies.
361
+ # //
362
+ # // Refer to [selector][google.api.DocumentationRule.selector] for syntax
363
+ # // details.
364
+ # string selector = 1;
365
+ #
366
+ # // Determines the URL pattern is matched by this rules. This pattern can be
367
+ # // used with any of the {get|put|post|delete|patch} methods. A custom method
368
+ # // can be defined using the 'custom' field.
369
+ # oneof pattern {
370
+ # // Maps to HTTP GET. Used for listing and getting information about
371
+ # // resources.
372
+ # string get = 2;
373
+ #
374
+ # // Maps to HTTP PUT. Used for replacing a resource.
375
+ # string put = 3;
376
+ #
377
+ # // Maps to HTTP POST. Used for creating a resource or performing an action.
378
+ # string post = 4;
379
+ #
380
+ # // Maps to HTTP DELETE. Used for deleting a resource.
381
+ # string delete = 5;
382
+ #
383
+ # // Maps to HTTP PATCH. Used for updating a resource.
384
+ # string patch = 6;
385
+ #
386
+ # // The custom pattern is used for specifying an HTTP method that is not
387
+ # // included in the `pattern` field, such as HEAD, or "*" to leave the
388
+ # // HTTP method unspecified for this rule. The wild-card rule is useful
389
+ # // for services that provide content to Web (HTML) clients.
390
+ # CustomHttpPattern custom = 8;
391
+ # }
392
+ #
393
+ # // The name of the request field whose value is mapped to the HTTP request
394
+ # // body, or `*` for mapping all request fields not captured by the path
395
+ # // pattern to the HTTP body, or omitted for not having any HTTP request body.
396
+ # //
397
+ # // NOTE: the referred field must be present at the top-level of the request
398
+ # // message type.
399
+ # string body = 7;
400
+ #
401
+ # // Optional. The name of the response field whose value is mapped to the HTTP
402
+ # // response body. When omitted, the entire response message will be used
403
+ # // as the HTTP response body.
404
+ # //
405
+ # // NOTE: The referred field must be present at the top-level of the response
406
+ # // message type.
407
+ # string response_body = 12;
408
+ #
409
+ # // Additional HTTP bindings for the selector. Nested bindings must
410
+ # // not contain an `additional_bindings` field themselves (that is,
411
+ # // the nesting may only be one level deep).
412
+ # repeated HttpRule additional_bindings = 11;
413
+ # }
414
+ #
415
+ # // A custom pattern is used for defining custom HTTP verb.
416
+ # message CustomHttpPattern {
417
+ # // The name of this custom HTTP verb.
418
+ # string kind = 1;
419
+ #
420
+ # // The path matched by this custom verb.
421
+ # string path = 2;
422
+ # }