google-cloud-network_services-v1 0.a → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +122 -0
  4. data/README.md +144 -8
  5. data/lib/google/cloud/network_services/v1/bindings_override.rb +279 -0
  6. data/lib/google/cloud/network_services/v1/dep_service/client.rb +1503 -0
  7. data/lib/google/cloud/network_services/v1/dep_service/credentials.rb +47 -0
  8. data/lib/google/cloud/network_services/v1/dep_service/operations.rb +809 -0
  9. data/lib/google/cloud/network_services/v1/dep_service/paths.rb +88 -0
  10. data/lib/google/cloud/network_services/v1/dep_service/rest/client.rb +1414 -0
  11. data/lib/google/cloud/network_services/v1/dep_service/rest/operations.rb +902 -0
  12. data/lib/google/cloud/network_services/v1/dep_service/rest/service_stub.rb +663 -0
  13. data/lib/google/cloud/network_services/v1/dep_service/rest.rb +54 -0
  14. data/lib/google/cloud/network_services/v1/dep_service.rb +56 -0
  15. data/lib/google/cloud/network_services/v1/network_services/client.rb +4383 -0
  16. data/lib/google/cloud/network_services/v1/network_services/credentials.rb +47 -0
  17. data/lib/google/cloud/network_services/v1/network_services/operations.rb +809 -0
  18. data/lib/google/cloud/network_services/v1/network_services/paths.rb +278 -0
  19. data/lib/google/cloud/network_services/v1/network_services/rest/client.rb +4093 -0
  20. data/lib/google/cloud/network_services/v1/network_services/rest/operations.rb +902 -0
  21. data/lib/google/cloud/network_services/v1/network_services/rest/service_stub.rb +2385 -0
  22. data/lib/google/cloud/network_services/v1/network_services/rest.rb +52 -0
  23. data/lib/google/cloud/network_services/v1/network_services.rb +54 -0
  24. data/lib/google/cloud/network_services/v1/rest.rb +39 -0
  25. data/lib/google/cloud/network_services/v1/version.rb +7 -2
  26. data/lib/google/cloud/network_services/v1.rb +46 -0
  27. data/lib/google/cloud/networkservices/v1/common_pb.rb +51 -0
  28. data/lib/google/cloud/networkservices/v1/dep_pb.rb +75 -0
  29. data/lib/google/cloud/networkservices/v1/dep_services_pb.rb +64 -0
  30. data/lib/google/cloud/networkservices/v1/endpoint_policy_pb.rb +58 -0
  31. data/lib/google/cloud/networkservices/v1/gateway_pb.rb +56 -0
  32. data/lib/google/cloud/networkservices/v1/grpc_route_pb.rb +69 -0
  33. data/lib/google/cloud/networkservices/v1/http_route_pb.rb +74 -0
  34. data/lib/google/cloud/networkservices/v1/mesh_pb.rb +55 -0
  35. data/lib/google/cloud/networkservices/v1/network_services_pb.rb +53 -0
  36. data/lib/google/cloud/networkservices/v1/network_services_services_pb.rb +120 -0
  37. data/lib/google/cloud/networkservices/v1/service_binding_pb.rb +52 -0
  38. data/lib/google/cloud/networkservices/v1/tcp_route_pb.rb +59 -0
  39. data/lib/google/cloud/networkservices/v1/tls_route_pb.rb +59 -0
  40. data/lib/google-cloud-network_services-v1.rb +21 -0
  41. data/proto_docs/README.md +4 -0
  42. data/proto_docs/google/api/client.rb +399 -0
  43. data/proto_docs/google/api/field_behavior.rb +85 -0
  44. data/proto_docs/google/api/field_info.rb +65 -0
  45. data/proto_docs/google/api/launch_stage.rb +71 -0
  46. data/proto_docs/google/api/resource.rb +222 -0
  47. data/proto_docs/google/cloud/networkservices/v1/common.rb +147 -0
  48. data/proto_docs/google/cloud/networkservices/v1/dep.rb +569 -0
  49. data/proto_docs/google/cloud/networkservices/v1/endpoint_policy.rb +194 -0
  50. data/proto_docs/google/cloud/networkservices/v1/gateway.rb +187 -0
  51. data/proto_docs/google/cloud/networkservices/v1/grpc_route.rb +430 -0
  52. data/proto_docs/google/cloud/networkservices/v1/http_route.rb +670 -0
  53. data/proto_docs/google/cloud/networkservices/v1/mesh.rb +155 -0
  54. data/proto_docs/google/cloud/networkservices/v1/service_binding.rb +131 -0
  55. data/proto_docs/google/cloud/networkservices/v1/tcp_route.rb +247 -0
  56. data/proto_docs/google/cloud/networkservices/v1/tls_route.rb +219 -0
  57. data/proto_docs/google/longrunning/operations.rb +164 -0
  58. data/proto_docs/google/protobuf/any.rb +145 -0
  59. data/proto_docs/google/protobuf/duration.rb +98 -0
  60. data/proto_docs/google/protobuf/empty.rb +34 -0
  61. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  62. data/proto_docs/google/protobuf/timestamp.rb +127 -0
  63. data/proto_docs/google/rpc/status.rb +48 -0
  64. data/proto_docs/google/type/expr.rb +75 -0
  65. metadata +144 -10
@@ -0,0 +1,670 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module NetworkServices
23
+ module V1
24
+ # HttpRoute is the resource defining how HTTP traffic should be routed by a
25
+ # Mesh or Gateway resource.
26
+ # @!attribute [rw] name
27
+ # @return [::String]
28
+ # Required. Name of the HttpRoute resource. It matches pattern
29
+ # `projects/*/locations/global/httpRoutes/http_route_name>`.
30
+ # @!attribute [r] self_link
31
+ # @return [::String]
32
+ # Output only. Server-defined URL of this resource
33
+ # @!attribute [rw] description
34
+ # @return [::String]
35
+ # Optional. A free-text description of the resource. Max length 1024
36
+ # characters.
37
+ # @!attribute [r] create_time
38
+ # @return [::Google::Protobuf::Timestamp]
39
+ # Output only. The timestamp when the resource was created.
40
+ # @!attribute [r] update_time
41
+ # @return [::Google::Protobuf::Timestamp]
42
+ # Output only. The timestamp when the resource was updated.
43
+ # @!attribute [rw] hostnames
44
+ # @return [::Array<::String>]
45
+ # Required. Hostnames define a set of hosts that should match against the
46
+ # HTTP host header to select a HttpRoute to process the request. Hostname is
47
+ # the fully qualified domain name of a network host, as defined by RFC 1123
48
+ # with the exception that:
49
+ # - IPs are not allowed.
50
+ # - A hostname may be prefixed with a wildcard label (`*.`). The wildcard
51
+ # label must appear by itself as the first label.
52
+ #
53
+ # Hostname can be "precise" which is a domain name without the terminating
54
+ # dot of a network host (e.g. `foo.example.com`) or "wildcard", which is a
55
+ # domain name prefixed with a single wildcard label (e.g. `*.example.com`).
56
+ #
57
+ # Note that as per RFC1035 and RFC1123, a label must consist of lower case
58
+ # alphanumeric characters or '-', and must start and end with an alphanumeric
59
+ # character. No other punctuation is allowed.
60
+ #
61
+ # The routes associated with a Mesh or Gateways must have unique hostnames.
62
+ # If you attempt to attach multiple routes with conflicting hostnames,
63
+ # the configuration will be rejected.
64
+ #
65
+ # For example, while it is acceptable for routes for the hostnames
66
+ # `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or
67
+ # Gateways under the same scope), it is not possible to associate two routes
68
+ # both with `*.bar.com` or both with `bar.com`.
69
+ # @!attribute [rw] meshes
70
+ # @return [::Array<::String>]
71
+ # Optional. Meshes defines a list of meshes this HttpRoute is attached to, as
72
+ # one of the routing rules to route the requests served by the mesh.
73
+ #
74
+ # Each mesh reference should match the pattern:
75
+ # `projects/*/locations/global/meshes/<mesh_name>`
76
+ #
77
+ # The attached Mesh should be of a type SIDECAR
78
+ # @!attribute [rw] gateways
79
+ # @return [::Array<::String>]
80
+ # Optional. Gateways defines a list of gateways this HttpRoute is attached
81
+ # to, as one of the routing rules to route the requests served by the
82
+ # gateway.
83
+ #
84
+ # Each gateway reference should match the pattern:
85
+ # `projects/*/locations/global/gateways/<gateway_name>`
86
+ # @!attribute [rw] labels
87
+ # @return [::Google::Protobuf::Map{::String => ::String}]
88
+ # Optional. Set of label tags associated with the HttpRoute resource.
89
+ # @!attribute [rw] rules
90
+ # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::RouteRule>]
91
+ # Required. Rules that define how traffic is routed and handled.
92
+ # Rules will be matched sequentially based on the RouteMatch specified for
93
+ # the rule.
94
+ class HttpRoute
95
+ include ::Google::Protobuf::MessageExts
96
+ extend ::Google::Protobuf::MessageExts::ClassMethods
97
+
98
+ # Specifies how to select a route rule based on HTTP request headers.
99
+ # @!attribute [rw] exact_match
100
+ # @return [::String]
101
+ # The value of the header should match exactly the content of
102
+ # exact_match.
103
+ # @!attribute [rw] regex_match
104
+ # @return [::String]
105
+ # The value of the header must match the regular expression specified in
106
+ # regex_match. For regular expression grammar, please see:
107
+ # https://github.com/google/re2/wiki/Syntax
108
+ # @!attribute [rw] prefix_match
109
+ # @return [::String]
110
+ # The value of the header must start with the contents of prefix_match.
111
+ # @!attribute [rw] present_match
112
+ # @return [::Boolean]
113
+ # A header with header_name must exist. The match takes place whether or
114
+ # not the header has a value.
115
+ # @!attribute [rw] suffix_match
116
+ # @return [::String]
117
+ # The value of the header must end with the contents of suffix_match.
118
+ # @!attribute [rw] range_match
119
+ # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderMatch::IntegerRange]
120
+ # If specified, the rule will match if the request header value is within
121
+ # the range.
122
+ # @!attribute [rw] header
123
+ # @return [::String]
124
+ # The name of the HTTP header to match against.
125
+ # @!attribute [rw] invert_match
126
+ # @return [::Boolean]
127
+ # If specified, the match result will be inverted before checking. Default
128
+ # value is set to false.
129
+ class HeaderMatch
130
+ include ::Google::Protobuf::MessageExts
131
+ extend ::Google::Protobuf::MessageExts::ClassMethods
132
+
133
+ # Represents an integer value range.
134
+ # @!attribute [rw] start
135
+ # @return [::Integer]
136
+ # Start of the range (inclusive)
137
+ # @!attribute [rw] end
138
+ # @return [::Integer]
139
+ # End of the range (exclusive)
140
+ class IntegerRange
141
+ include ::Google::Protobuf::MessageExts
142
+ extend ::Google::Protobuf::MessageExts::ClassMethods
143
+ end
144
+ end
145
+
146
+ # Specifications to match a query parameter in the request.
147
+ # @!attribute [rw] exact_match
148
+ # @return [::String]
149
+ # The value of the query parameter must exactly match the contents of
150
+ # exact_match.
151
+ #
152
+ # Only one of exact_match, regex_match, or present_match must be set.
153
+ # @!attribute [rw] regex_match
154
+ # @return [::String]
155
+ # The value of the query parameter must match the regular expression
156
+ # specified by regex_match. For regular expression grammar, please see
157
+ # https://github.com/google/re2/wiki/Syntax
158
+ #
159
+ # Only one of exact_match, regex_match, or present_match must be set.
160
+ # @!attribute [rw] present_match
161
+ # @return [::Boolean]
162
+ # Specifies that the QueryParameterMatcher matches if request contains
163
+ # query parameter, irrespective of whether the parameter has a value or
164
+ # not.
165
+ #
166
+ # Only one of exact_match, regex_match, or present_match must be set.
167
+ # @!attribute [rw] query_parameter
168
+ # @return [::String]
169
+ # The name of the query parameter to match.
170
+ class QueryParameterMatch
171
+ include ::Google::Protobuf::MessageExts
172
+ extend ::Google::Protobuf::MessageExts::ClassMethods
173
+ end
174
+
175
+ # RouteMatch defines specifications used to match requests. If multiple match
176
+ # types are set, this RouteMatch will match if ALL type of matches are
177
+ # matched.
178
+ # @!attribute [rw] full_path_match
179
+ # @return [::String]
180
+ # The HTTP request path value should exactly match this value.
181
+ #
182
+ # Only one of full_path_match, prefix_match, or regex_match should be
183
+ # used.
184
+ # @!attribute [rw] prefix_match
185
+ # @return [::String]
186
+ # The HTTP request path value must begin with specified prefix_match.
187
+ # prefix_match must begin with a /.
188
+ #
189
+ # Only one of full_path_match, prefix_match, or regex_match should be
190
+ # used.
191
+ # @!attribute [rw] regex_match
192
+ # @return [::String]
193
+ # The HTTP request path value must satisfy the regular expression
194
+ # specified by regex_match after removing any query parameters and anchor
195
+ # supplied with the original URL. For regular expression grammar, please
196
+ # see https://github.com/google/re2/wiki/Syntax
197
+ #
198
+ # Only one of full_path_match, prefix_match, or regex_match should be
199
+ # used.
200
+ # @!attribute [rw] ignore_case
201
+ # @return [::Boolean]
202
+ # Specifies if prefix_match and full_path_match matches are case sensitive.
203
+ # The default value is false.
204
+ # @!attribute [rw] headers
205
+ # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderMatch>]
206
+ # Specifies a list of HTTP request headers to match against. ALL of the
207
+ # supplied headers must be matched.
208
+ # @!attribute [rw] query_parameters
209
+ # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::QueryParameterMatch>]
210
+ # Specifies a list of query parameters to match against. ALL of the query
211
+ # parameters must be matched.
212
+ class RouteMatch
213
+ include ::Google::Protobuf::MessageExts
214
+ extend ::Google::Protobuf::MessageExts::ClassMethods
215
+ end
216
+
217
+ # Specifications of a destination to which the request should be routed to.
218
+ # @!attribute [rw] service_name
219
+ # @return [::String]
220
+ # The URL of a BackendService to route traffic to.
221
+ # @!attribute [rw] weight
222
+ # @return [::Integer]
223
+ # Specifies the proportion of requests forwarded to the backend referenced
224
+ # by the serviceName field. This is computed as:
225
+ # - weight/Sum(weights in this destination list).
226
+ # For non-zero values, there may be some epsilon from the exact proportion
227
+ # defined here depending on the precision an implementation supports.
228
+ #
229
+ # If only one serviceName is specified and it has a weight greater than 0,
230
+ # 100% of the traffic is forwarded to that backend.
231
+ #
232
+ # If weights are specified for any one service name, they need to be
233
+ # specified for all of them.
234
+ #
235
+ # If weights are unspecified for all services, then, traffic is distributed
236
+ # in equal proportions to all of them.
237
+ class Destination
238
+ include ::Google::Protobuf::MessageExts
239
+ extend ::Google::Protobuf::MessageExts::ClassMethods
240
+ end
241
+
242
+ # The specification for redirecting traffic.
243
+ # @!attribute [rw] host_redirect
244
+ # @return [::String]
245
+ # The host that will be used in the redirect response instead of the one
246
+ # that was supplied in the request.
247
+ # @!attribute [rw] path_redirect
248
+ # @return [::String]
249
+ # The path that will be used in the redirect response instead of the one
250
+ # that was supplied in the request.
251
+ # path_redirect can not be supplied together with prefix_redirect. Supply
252
+ # one alone or neither. If neither is supplied, the path of the original
253
+ # request will be used for the redirect.
254
+ # @!attribute [rw] prefix_rewrite
255
+ # @return [::String]
256
+ # Indicates that during redirection, the matched prefix (or path) should be
257
+ # swapped with this value. This option allows URLs be dynamically created
258
+ # based on the request.
259
+ # @!attribute [rw] response_code
260
+ # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::Redirect::ResponseCode]
261
+ # The HTTP Status code to use for the redirect.
262
+ # @!attribute [rw] https_redirect
263
+ # @return [::Boolean]
264
+ # If set to true, the URL scheme in the redirected request is set to https.
265
+ # If set to false, the URL scheme of the redirected request will remain the
266
+ # same as that of the request.
267
+ #
268
+ # The default is set to false.
269
+ # @!attribute [rw] strip_query
270
+ # @return [::Boolean]
271
+ # if set to true, any accompanying query portion of the original URL is
272
+ # removed prior to redirecting the request. If set to false, the query
273
+ # portion of the original URL is retained.
274
+ #
275
+ # The default is set to false.
276
+ # @!attribute [rw] port_redirect
277
+ # @return [::Integer]
278
+ # The port that will be used in the redirected request instead of the one
279
+ # that was supplied in the request.
280
+ class Redirect
281
+ include ::Google::Protobuf::MessageExts
282
+ extend ::Google::Protobuf::MessageExts::ClassMethods
283
+
284
+ # Supported HTTP response code.
285
+ module ResponseCode
286
+ # Default value
287
+ RESPONSE_CODE_UNSPECIFIED = 0
288
+
289
+ # Corresponds to 301.
290
+ MOVED_PERMANENTLY_DEFAULT = 1
291
+
292
+ # Corresponds to 302.
293
+ FOUND = 2
294
+
295
+ # Corresponds to 303.
296
+ SEE_OTHER = 3
297
+
298
+ # Corresponds to 307. In this case, the request method will be retained.
299
+ TEMPORARY_REDIRECT = 4
300
+
301
+ # Corresponds to 308. In this case, the request method will be retained.
302
+ PERMANENT_REDIRECT = 5
303
+ end
304
+ end
305
+
306
+ # The specification for fault injection introduced into traffic to test the
307
+ # resiliency of clients to destination service failure. As part of fault
308
+ # injection, when clients send requests to a destination, delays can be
309
+ # introduced by client proxy on a percentage of requests before sending those
310
+ # requests to the destination service. Similarly requests can be aborted by
311
+ # client proxy for a percentage of requests.
312
+ # @!attribute [rw] delay
313
+ # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::FaultInjectionPolicy::Delay]
314
+ # The specification for injecting delay to client requests.
315
+ # @!attribute [rw] abort
316
+ # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::FaultInjectionPolicy::Abort]
317
+ # The specification for aborting to client requests.
318
+ class FaultInjectionPolicy
319
+ include ::Google::Protobuf::MessageExts
320
+ extend ::Google::Protobuf::MessageExts::ClassMethods
321
+
322
+ # Specification of how client requests are delayed as part of fault
323
+ # injection before being sent to a destination.
324
+ # @!attribute [rw] fixed_delay
325
+ # @return [::Google::Protobuf::Duration]
326
+ # Specify a fixed delay before forwarding the request.
327
+ # @!attribute [rw] percentage
328
+ # @return [::Integer]
329
+ # The percentage of traffic on which delay will be injected.
330
+ #
331
+ # The value must be between [0, 100]
332
+ class Delay
333
+ include ::Google::Protobuf::MessageExts
334
+ extend ::Google::Protobuf::MessageExts::ClassMethods
335
+ end
336
+
337
+ # Specification of how client requests are aborted as part of fault
338
+ # injection before being sent to a destination.
339
+ # @!attribute [rw] http_status
340
+ # @return [::Integer]
341
+ # The HTTP status code used to abort the request.
342
+ #
343
+ # The value must be between 200 and 599 inclusive.
344
+ # @!attribute [rw] percentage
345
+ # @return [::Integer]
346
+ # The percentage of traffic which will be aborted.
347
+ #
348
+ # The value must be between [0, 100]
349
+ class Abort
350
+ include ::Google::Protobuf::MessageExts
351
+ extend ::Google::Protobuf::MessageExts::ClassMethods
352
+ end
353
+ end
354
+
355
+ # The specification for modifying HTTP header in HTTP request and HTTP
356
+ # response.
357
+ # @!attribute [rw] set
358
+ # @return [::Google::Protobuf::Map{::String => ::String}]
359
+ # Completely overwrite/replace the headers with given map where key is the
360
+ # name of the header, value is the value of the header.
361
+ # @!attribute [rw] add
362
+ # @return [::Google::Protobuf::Map{::String => ::String}]
363
+ # Add the headers with given map where key is the name of the header, value
364
+ # is the value of the header.
365
+ # @!attribute [rw] remove
366
+ # @return [::Array<::String>]
367
+ # Remove headers (matching by header names) specified in the list.
368
+ class HeaderModifier
369
+ include ::Google::Protobuf::MessageExts
370
+ extend ::Google::Protobuf::MessageExts::ClassMethods
371
+
372
+ # @!attribute [rw] key
373
+ # @return [::String]
374
+ # @!attribute [rw] value
375
+ # @return [::String]
376
+ class SetEntry
377
+ include ::Google::Protobuf::MessageExts
378
+ extend ::Google::Protobuf::MessageExts::ClassMethods
379
+ end
380
+
381
+ # @!attribute [rw] key
382
+ # @return [::String]
383
+ # @!attribute [rw] value
384
+ # @return [::String]
385
+ class AddEntry
386
+ include ::Google::Protobuf::MessageExts
387
+ extend ::Google::Protobuf::MessageExts::ClassMethods
388
+ end
389
+ end
390
+
391
+ # The specification for modifying the URL of the request, prior to forwarding
392
+ # the request to the destination.
393
+ # @!attribute [rw] path_prefix_rewrite
394
+ # @return [::String]
395
+ # Prior to forwarding the request to the selected destination, the matching
396
+ # portion of the requests path is replaced by this value.
397
+ # @!attribute [rw] host_rewrite
398
+ # @return [::String]
399
+ # Prior to forwarding the request to the selected destination, the requests
400
+ # host header is replaced by this value.
401
+ class URLRewrite
402
+ include ::Google::Protobuf::MessageExts
403
+ extend ::Google::Protobuf::MessageExts::ClassMethods
404
+ end
405
+
406
+ # The specifications for retries.
407
+ # @!attribute [rw] retry_conditions
408
+ # @return [::Array<::String>]
409
+ # Specifies one or more conditions when this retry policy applies. Valid
410
+ # values are:
411
+ # 5xx: Proxy will attempt a retry if the destination service responds
412
+ # with any 5xx response code, of if the destination service does not
413
+ # respond at all, example: disconnect, reset, read timeout, connection
414
+ # failure and refused streams.
415
+ #
416
+ # gateway-error: Similar to 5xx, but only applies to response codes 502,
417
+ # 503, 504.
418
+ #
419
+ # reset: Proxy will attempt a retry if the destination service does not
420
+ # respond at all (disconnect/reset/read timeout)
421
+ #
422
+ # connect-failure: Proxy will retry on failures connecting to destination
423
+ # for example due to connection timeouts.
424
+ #
425
+ # retriable-4xx: Proxy will retry fro retriable 4xx response codes.
426
+ # Currently the only retriable error supported is 409.
427
+ #
428
+ # refused-stream: Proxy will retry if the destination resets the stream
429
+ # with a REFUSED_STREAM error code. This reset type indicates that it
430
+ # is safe to retry.
431
+ # @!attribute [rw] num_retries
432
+ # @return [::Integer]
433
+ # Specifies the allowed number of retries. This number must be > 0. If not
434
+ # specified, default to 1.
435
+ # @!attribute [rw] per_try_timeout
436
+ # @return [::Google::Protobuf::Duration]
437
+ # Specifies a non-zero timeout per retry attempt.
438
+ class RetryPolicy
439
+ include ::Google::Protobuf::MessageExts
440
+ extend ::Google::Protobuf::MessageExts::ClassMethods
441
+ end
442
+
443
+ # Specifies the policy on how requests are shadowed to a separate mirrored
444
+ # destination service. The proxy does not wait for responses from the
445
+ # shadow service. Prior to sending traffic to the shadow service, the
446
+ # host/authority header is suffixed with -shadow.
447
+ # @!attribute [rw] destination
448
+ # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::Destination]
449
+ # The destination the requests will be mirrored to. The weight of the
450
+ # destination will be ignored.
451
+ class RequestMirrorPolicy
452
+ include ::Google::Protobuf::MessageExts
453
+ extend ::Google::Protobuf::MessageExts::ClassMethods
454
+ end
455
+
456
+ # The Specification for allowing client side cross-origin requests.
457
+ # @!attribute [rw] allow_origins
458
+ # @return [::Array<::String>]
459
+ # Specifies the list of origins that will be allowed to do CORS requests.
460
+ # An origin is allowed if it matches either an item in allow_origins or
461
+ # an item in allow_origin_regexes.
462
+ # @!attribute [rw] allow_origin_regexes
463
+ # @return [::Array<::String>]
464
+ # Specifies the regular expression patterns that match allowed origins. For
465
+ # regular expression grammar, please see
466
+ # https://github.com/google/re2/wiki/Syntax.
467
+ # @!attribute [rw] allow_methods
468
+ # @return [::Array<::String>]
469
+ # Specifies the content for Access-Control-Allow-Methods header.
470
+ # @!attribute [rw] allow_headers
471
+ # @return [::Array<::String>]
472
+ # Specifies the content for Access-Control-Allow-Headers header.
473
+ # @!attribute [rw] expose_headers
474
+ # @return [::Array<::String>]
475
+ # Specifies the content for Access-Control-Expose-Headers header.
476
+ # @!attribute [rw] max_age
477
+ # @return [::String]
478
+ # Specifies how long result of a preflight request can be cached in
479
+ # seconds. This translates to the Access-Control-Max-Age header.
480
+ # @!attribute [rw] allow_credentials
481
+ # @return [::Boolean]
482
+ # In response to a preflight request, setting this to true indicates that
483
+ # the actual request can include user credentials. This translates to the
484
+ # Access-Control-Allow-Credentials header.
485
+ #
486
+ # Default value is false.
487
+ # @!attribute [rw] disabled
488
+ # @return [::Boolean]
489
+ # If true, the CORS policy is disabled. The default value is false, which
490
+ # indicates that the CORS policy is in effect.
491
+ class CorsPolicy
492
+ include ::Google::Protobuf::MessageExts
493
+ extend ::Google::Protobuf::MessageExts::ClassMethods
494
+ end
495
+
496
+ # The specifications for routing traffic and applying associated policies.
497
+ # @!attribute [rw] destinations
498
+ # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::Destination>]
499
+ # The destination to which traffic should be forwarded.
500
+ # @!attribute [rw] redirect
501
+ # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::Redirect]
502
+ # If set, the request is directed as configured by this field.
503
+ # @!attribute [rw] fault_injection_policy
504
+ # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::FaultInjectionPolicy]
505
+ # The specification for fault injection introduced into traffic to test the
506
+ # resiliency of clients to backend service failure. As part of fault
507
+ # injection, when clients send requests to a backend service, delays can be
508
+ # introduced on a percentage of requests before sending those requests to
509
+ # the backend service. Similarly requests from clients can be aborted for a
510
+ # percentage of requests.
511
+ #
512
+ # timeout and retry_policy will be ignored by clients that are configured
513
+ # with a fault_injection_policy
514
+ # @!attribute [rw] request_header_modifier
515
+ # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier]
516
+ # The specification for modifying the headers of a matching request prior
517
+ # to delivery of the request to the destination. If HeaderModifiers are set
518
+ # on both the Destination and the RouteAction, they will be merged.
519
+ # Conflicts between the two will not be resolved on the configuration.
520
+ # @!attribute [rw] response_header_modifier
521
+ # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::HeaderModifier]
522
+ # The specification for modifying the headers of a response prior to
523
+ # sending the response back to the client. If HeaderModifiers are set
524
+ # on both the Destination and the RouteAction, they will be merged.
525
+ # Conflicts between the two will not be resolved on the configuration.
526
+ # @!attribute [rw] url_rewrite
527
+ # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::URLRewrite]
528
+ # The specification for rewrite URL before forwarding requests to the
529
+ # destination.
530
+ # @!attribute [rw] timeout
531
+ # @return [::Google::Protobuf::Duration]
532
+ # Specifies the timeout for selected route. Timeout is computed from the
533
+ # time the request has been fully processed (i.e. end of stream) up until
534
+ # the response has been completely processed. Timeout includes all retries.
535
+ # @!attribute [rw] retry_policy
536
+ # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::RetryPolicy]
537
+ # Specifies the retry policy associated with this route.
538
+ # @!attribute [rw] request_mirror_policy
539
+ # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::RequestMirrorPolicy]
540
+ # Specifies the policy on how requests intended for the routes destination
541
+ # are shadowed to a separate mirrored destination. Proxy will not wait for
542
+ # the shadow destination to respond before returning the response. Prior to
543
+ # sending traffic to the shadow service, the host/authority header is
544
+ # suffixed with -shadow.
545
+ # @!attribute [rw] cors_policy
546
+ # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::CorsPolicy]
547
+ # The specification for allowing client side cross-origin requests.
548
+ class RouteAction
549
+ include ::Google::Protobuf::MessageExts
550
+ extend ::Google::Protobuf::MessageExts::ClassMethods
551
+ end
552
+
553
+ # Specifies how to match traffic and how to route traffic when traffic is
554
+ # matched.
555
+ # @!attribute [rw] matches
556
+ # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute::RouteMatch>]
557
+ # A list of matches define conditions used for matching the rule against
558
+ # incoming HTTP requests. Each match is independent, i.e. this rule will be
559
+ # matched if ANY one of the matches is satisfied.
560
+ #
561
+ # If no matches field is specified, this rule will unconditionally match
562
+ # traffic.
563
+ #
564
+ # If a default rule is desired to be configured, add a rule with no matches
565
+ # specified to the end of the rules list.
566
+ # @!attribute [rw] action
567
+ # @return [::Google::Cloud::NetworkServices::V1::HttpRoute::RouteAction]
568
+ # The detailed rule defining how to route matched traffic.
569
+ class RouteRule
570
+ include ::Google::Protobuf::MessageExts
571
+ extend ::Google::Protobuf::MessageExts::ClassMethods
572
+ end
573
+
574
+ # @!attribute [rw] key
575
+ # @return [::String]
576
+ # @!attribute [rw] value
577
+ # @return [::String]
578
+ class LabelsEntry
579
+ include ::Google::Protobuf::MessageExts
580
+ extend ::Google::Protobuf::MessageExts::ClassMethods
581
+ end
582
+ end
583
+
584
+ # Request used with the ListHttpRoutes method.
585
+ # @!attribute [rw] parent
586
+ # @return [::String]
587
+ # Required. The project and location from which the HttpRoutes should be
588
+ # listed, specified in the format `projects/*/locations/global`.
589
+ # @!attribute [rw] page_size
590
+ # @return [::Integer]
591
+ # Maximum number of HttpRoutes to return per call.
592
+ # @!attribute [rw] page_token
593
+ # @return [::String]
594
+ # The value returned by the last `ListHttpRoutesResponse`
595
+ # Indicates that this is a continuation of a prior `ListHttpRoutes` call,
596
+ # and that the system should return the next page of data.
597
+ class ListHttpRoutesRequest
598
+ include ::Google::Protobuf::MessageExts
599
+ extend ::Google::Protobuf::MessageExts::ClassMethods
600
+ end
601
+
602
+ # Response returned by the ListHttpRoutes method.
603
+ # @!attribute [rw] http_routes
604
+ # @return [::Array<::Google::Cloud::NetworkServices::V1::HttpRoute>]
605
+ # List of HttpRoute resources.
606
+ # @!attribute [rw] next_page_token
607
+ # @return [::String]
608
+ # If there might be more results than those appearing in this response, then
609
+ # `next_page_token` is included. To get the next set of results, call this
610
+ # method again using the value of `next_page_token` as `page_token`.
611
+ class ListHttpRoutesResponse
612
+ include ::Google::Protobuf::MessageExts
613
+ extend ::Google::Protobuf::MessageExts::ClassMethods
614
+ end
615
+
616
+ # Request used by the GetHttpRoute method.
617
+ # @!attribute [rw] name
618
+ # @return [::String]
619
+ # Required. A name of the HttpRoute to get. Must be in the format
620
+ # `projects/*/locations/global/httpRoutes/*`.
621
+ class GetHttpRouteRequest
622
+ include ::Google::Protobuf::MessageExts
623
+ extend ::Google::Protobuf::MessageExts::ClassMethods
624
+ end
625
+
626
+ # Request used by the HttpRoute method.
627
+ # @!attribute [rw] parent
628
+ # @return [::String]
629
+ # Required. The parent resource of the HttpRoute. Must be in the
630
+ # format `projects/*/locations/global`.
631
+ # @!attribute [rw] http_route_id
632
+ # @return [::String]
633
+ # Required. Short name of the HttpRoute resource to be created.
634
+ # @!attribute [rw] http_route
635
+ # @return [::Google::Cloud::NetworkServices::V1::HttpRoute]
636
+ # Required. HttpRoute resource to be created.
637
+ class CreateHttpRouteRequest
638
+ include ::Google::Protobuf::MessageExts
639
+ extend ::Google::Protobuf::MessageExts::ClassMethods
640
+ end
641
+
642
+ # Request used by the UpdateHttpRoute method.
643
+ # @!attribute [rw] update_mask
644
+ # @return [::Google::Protobuf::FieldMask]
645
+ # Optional. Field mask is used to specify the fields to be overwritten in the
646
+ # HttpRoute resource by the update.
647
+ # The fields specified in the update_mask are relative to the resource, not
648
+ # the full request. A field will be overwritten if it is in the mask. If the
649
+ # user does not provide a mask then all fields will be overwritten.
650
+ # @!attribute [rw] http_route
651
+ # @return [::Google::Cloud::NetworkServices::V1::HttpRoute]
652
+ # Required. Updated HttpRoute resource.
653
+ class UpdateHttpRouteRequest
654
+ include ::Google::Protobuf::MessageExts
655
+ extend ::Google::Protobuf::MessageExts::ClassMethods
656
+ end
657
+
658
+ # Request used by the DeleteHttpRoute method.
659
+ # @!attribute [rw] name
660
+ # @return [::String]
661
+ # Required. A name of the HttpRoute to delete. Must be in the format
662
+ # `projects/*/locations/global/httpRoutes/*`.
663
+ class DeleteHttpRouteRequest
664
+ include ::Google::Protobuf::MessageExts
665
+ extend ::Google::Protobuf::MessageExts::ClassMethods
666
+ end
667
+ end
668
+ end
669
+ end
670
+ end