google-cloud-network_security-v1beta1 0.3.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/AUTHENTICATION.md +1 -1
  3. data/README.md +2 -2
  4. data/lib/google/cloud/network_security/v1beta1/bindings_override.rb +183 -0
  5. data/lib/google/cloud/network_security/v1beta1/network_security/client.rb +50 -56
  6. data/lib/google/cloud/network_security/v1beta1/network_security/operations.rb +14 -16
  7. data/lib/google/cloud/network_security/v1beta1/network_security/rest/client.rb +1451 -0
  8. data/lib/google/cloud/network_security/v1beta1/network_security/rest/operations.rb +793 -0
  9. data/lib/google/cloud/network_security/v1beta1/network_security/rest/service_stub.rb +939 -0
  10. data/lib/google/cloud/network_security/v1beta1/network_security/rest.rb +56 -0
  11. data/lib/google/cloud/network_security/v1beta1/network_security.rb +7 -1
  12. data/lib/google/cloud/network_security/v1beta1/rest.rb +38 -0
  13. data/lib/google/cloud/network_security/v1beta1/version.rb +1 -1
  14. data/lib/google/cloud/network_security/v1beta1.rb +7 -2
  15. data/lib/google/cloud/networksecurity/v1beta1/authorization_policy_pb.rb +26 -59
  16. data/lib/google/cloud/networksecurity/v1beta1/client_tls_policy_pb.rb +27 -35
  17. data/lib/google/cloud/networksecurity/v1beta1/common_pb.rb +25 -10
  18. data/lib/google/cloud/networksecurity/v1beta1/network_security_pb.rb +25 -2
  19. data/lib/google/cloud/networksecurity/v1beta1/server_tls_policy_pb.rb +27 -38
  20. data/lib/google/cloud/networksecurity/v1beta1/tls_pb.rb +24 -19
  21. data/proto_docs/google/api/client.rb +381 -0
  22. data/proto_docs/google/api/launch_stage.rb +71 -0
  23. data/proto_docs/google/protobuf/any.rb +7 -4
  24. data/proto_docs/google/protobuf/timestamp.rb +1 -3
  25. data/proto_docs/google/rpc/status.rb +4 -2
  26. metadata +19 -11
@@ -0,0 +1,1451 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2023 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
+ require "google/cloud/errors"
20
+ require "google/cloud/networksecurity/v1beta1/network_security_pb"
21
+ require "google/cloud/network_security/v1beta1/network_security/rest/service_stub"
22
+ require "google/cloud/location/rest"
23
+ require "google/iam/v1/rest"
24
+
25
+ module Google
26
+ module Cloud
27
+ module NetworkSecurity
28
+ module V1beta1
29
+ module NetworkSecurity
30
+ module Rest
31
+ ##
32
+ # REST client for the NetworkSecurity service.
33
+ #
34
+ # Network Security API provides resources to configure authentication and
35
+ # authorization policies. Refer to per API resource documentation for more
36
+ # information.
37
+ #
38
+ class Client
39
+ include Paths
40
+
41
+ # @private
42
+ attr_reader :network_security_stub
43
+
44
+ ##
45
+ # Configure the NetworkSecurity Client class.
46
+ #
47
+ # See {::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Rest::Client::Configuration}
48
+ # for a description of the configuration fields.
49
+ #
50
+ # @example
51
+ #
52
+ # # Modify the configuration for all NetworkSecurity clients
53
+ # ::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Rest::Client.configure do |config|
54
+ # config.timeout = 10.0
55
+ # end
56
+ #
57
+ # @yield [config] Configure the Client client.
58
+ # @yieldparam config [Client::Configuration]
59
+ #
60
+ # @return [Client::Configuration]
61
+ #
62
+ def self.configure
63
+ @configure ||= begin
64
+ namespace = ["Google", "Cloud", "NetworkSecurity", "V1beta1"]
65
+ parent_config = while namespace.any?
66
+ parent_name = namespace.join "::"
67
+ parent_const = const_get parent_name
68
+ break parent_const.configure if parent_const.respond_to? :configure
69
+ namespace.pop
70
+ end
71
+ default_config = Client::Configuration.new parent_config
72
+
73
+ default_config.timeout = 60.0
74
+
75
+ default_config
76
+ end
77
+ yield @configure if block_given?
78
+ @configure
79
+ end
80
+
81
+ ##
82
+ # Configure the NetworkSecurity Client instance.
83
+ #
84
+ # The configuration is set to the derived mode, meaning that values can be changed,
85
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
86
+ # should be made on {Client.configure}.
87
+ #
88
+ # See {::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Rest::Client::Configuration}
89
+ # for a description of the configuration fields.
90
+ #
91
+ # @yield [config] Configure the Client client.
92
+ # @yieldparam config [Client::Configuration]
93
+ #
94
+ # @return [Client::Configuration]
95
+ #
96
+ def configure
97
+ yield @config if block_given?
98
+ @config
99
+ end
100
+
101
+ ##
102
+ # Create a new NetworkSecurity REST client object.
103
+ #
104
+ # @example
105
+ #
106
+ # # Create a client using the default configuration
107
+ # client = ::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Rest::Client.new
108
+ #
109
+ # # Create a client using a custom configuration
110
+ # client = ::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Rest::Client.new do |config|
111
+ # config.timeout = 10.0
112
+ # end
113
+ #
114
+ # @yield [config] Configure the NetworkSecurity client.
115
+ # @yieldparam config [Client::Configuration]
116
+ #
117
+ def initialize
118
+ # Create the configuration object
119
+ @config = Configuration.new Client.configure
120
+
121
+ # Yield the configuration if needed
122
+ yield @config if block_given?
123
+
124
+ # Create credentials
125
+ credentials = @config.credentials
126
+ # Use self-signed JWT if the endpoint is unchanged from default,
127
+ # but only if the default endpoint does not have a region prefix.
128
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
129
+ !@config.endpoint.split(".").first.include?("-")
130
+ credentials ||= Credentials.default scope: @config.scope,
131
+ enable_self_signed_jwt: enable_self_signed_jwt
132
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
133
+ credentials = Credentials.new credentials, scope: @config.scope
134
+ end
135
+
136
+ @quota_project_id = @config.quota_project
137
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
138
+
139
+ @operations_client = ::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Rest::Operations.new do |config|
140
+ config.credentials = credentials
141
+ config.quota_project = @quota_project_id
142
+ config.endpoint = @config.endpoint
143
+ end
144
+
145
+ @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
146
+ config.credentials = credentials
147
+ config.quota_project = @quota_project_id
148
+ config.endpoint = @config.endpoint
149
+ config.bindings_override = @config.bindings_override
150
+ end
151
+
152
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Rest::Client.new do |config|
153
+ config.credentials = credentials
154
+ config.quota_project = @quota_project_id
155
+ config.endpoint = @config.endpoint
156
+ config.bindings_override = @config.bindings_override
157
+ end
158
+
159
+ @network_security_stub = ::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
160
+ end
161
+
162
+ ##
163
+ # Get the associated client for long-running operations.
164
+ #
165
+ # @return [::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Rest::Operations]
166
+ #
167
+ attr_reader :operations_client
168
+
169
+ ##
170
+ # Get the associated client for mix-in of the Locations.
171
+ #
172
+ # @return [Google::Cloud::Location::Locations::Rest::Client]
173
+ #
174
+ attr_reader :location_client
175
+
176
+ ##
177
+ # Get the associated client for mix-in of the IAMPolicy.
178
+ #
179
+ # @return [Google::Iam::V1::IAMPolicy::Rest::Client]
180
+ #
181
+ attr_reader :iam_policy_client
182
+
183
+ # Service calls
184
+
185
+ ##
186
+ # Lists AuthorizationPolicies in a given project and location.
187
+ #
188
+ # @overload list_authorization_policies(request, options = nil)
189
+ # Pass arguments to `list_authorization_policies` via a request object, either of type
190
+ # {::Google::Cloud::NetworkSecurity::V1beta1::ListAuthorizationPoliciesRequest} or an equivalent Hash.
191
+ #
192
+ # @param request [::Google::Cloud::NetworkSecurity::V1beta1::ListAuthorizationPoliciesRequest, ::Hash]
193
+ # A request object representing the call parameters. Required. To specify no
194
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
195
+ # @param options [::Gapic::CallOptions, ::Hash]
196
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
197
+ #
198
+ # @overload list_authorization_policies(parent: nil, page_size: nil, page_token: nil)
199
+ # Pass arguments to `list_authorization_policies` via keyword arguments. Note that at
200
+ # least one keyword argument is required. To specify no parameters, or to keep all
201
+ # the default parameter values, pass an empty Hash as a request object (see above).
202
+ #
203
+ # @param parent [::String]
204
+ # Required. The project and location from which the AuthorizationPolicies
205
+ # should be listed, specified in the format
206
+ # `projects/{project}/locations/{location}`.
207
+ # @param page_size [::Integer]
208
+ # Maximum number of AuthorizationPolicies to return per call.
209
+ # @param page_token [::String]
210
+ # The value returned by the last
211
+ # `ListAuthorizationPoliciesResponse` Indicates that this is a
212
+ # continuation of a prior `ListAuthorizationPolicies` call, and
213
+ # that the system should return the next page of data.
214
+ # @yield [result, operation] Access the result along with the TransportOperation object
215
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy>]
216
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
217
+ #
218
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy>]
219
+ #
220
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
221
+ def list_authorization_policies request, options = nil
222
+ raise ::ArgumentError, "request must be provided" if request.nil?
223
+
224
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1beta1::ListAuthorizationPoliciesRequest
225
+
226
+ # Converts hash and nil to an options object
227
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
228
+
229
+ # Customize the options with defaults
230
+ call_metadata = @config.rpcs.list_authorization_policies.metadata.to_h
231
+
232
+ # Set x-goog-api-client and x-goog-user-project headers
233
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
234
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
235
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION,
236
+ transports_version_send: [:rest]
237
+
238
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
239
+
240
+ options.apply_defaults timeout: @config.rpcs.list_authorization_policies.timeout,
241
+ metadata: call_metadata,
242
+ retry_policy: @config.rpcs.list_authorization_policies.retry_policy
243
+
244
+ options.apply_defaults timeout: @config.timeout,
245
+ metadata: @config.metadata,
246
+ retry_policy: @config.retry_policy
247
+
248
+ @network_security_stub.list_authorization_policies request, options do |result, operation|
249
+ result = ::Gapic::Rest::PagedEnumerable.new @network_security_stub, :list_authorization_policies, "authorization_policies", request, result, options
250
+ yield result, operation if block_given?
251
+ return result
252
+ end
253
+ rescue ::Gapic::Rest::Error => e
254
+ raise ::Google::Cloud::Error.from_error(e)
255
+ end
256
+
257
+ ##
258
+ # Gets details of a single AuthorizationPolicy.
259
+ #
260
+ # @overload get_authorization_policy(request, options = nil)
261
+ # Pass arguments to `get_authorization_policy` via a request object, either of type
262
+ # {::Google::Cloud::NetworkSecurity::V1beta1::GetAuthorizationPolicyRequest} or an equivalent Hash.
263
+ #
264
+ # @param request [::Google::Cloud::NetworkSecurity::V1beta1::GetAuthorizationPolicyRequest, ::Hash]
265
+ # A request object representing the call parameters. Required. To specify no
266
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
267
+ # @param options [::Gapic::CallOptions, ::Hash]
268
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
269
+ #
270
+ # @overload get_authorization_policy(name: nil)
271
+ # Pass arguments to `get_authorization_policy` via keyword arguments. Note that at
272
+ # least one keyword argument is required. To specify no parameters, or to keep all
273
+ # the default parameter values, pass an empty Hash as a request object (see above).
274
+ #
275
+ # @param name [::String]
276
+ # Required. A name of the AuthorizationPolicy to get. Must be in the format
277
+ # `projects/{project}/locations/{location}/authorizationPolicies/*`.
278
+ # @yield [result, operation] Access the result along with the TransportOperation object
279
+ # @yieldparam result [::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy]
280
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
281
+ #
282
+ # @return [::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy]
283
+ #
284
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
285
+ def get_authorization_policy request, options = nil
286
+ raise ::ArgumentError, "request must be provided" if request.nil?
287
+
288
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1beta1::GetAuthorizationPolicyRequest
289
+
290
+ # Converts hash and nil to an options object
291
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
292
+
293
+ # Customize the options with defaults
294
+ call_metadata = @config.rpcs.get_authorization_policy.metadata.to_h
295
+
296
+ # Set x-goog-api-client and x-goog-user-project headers
297
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
298
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
299
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION,
300
+ transports_version_send: [:rest]
301
+
302
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
303
+
304
+ options.apply_defaults timeout: @config.rpcs.get_authorization_policy.timeout,
305
+ metadata: call_metadata,
306
+ retry_policy: @config.rpcs.get_authorization_policy.retry_policy
307
+
308
+ options.apply_defaults timeout: @config.timeout,
309
+ metadata: @config.metadata,
310
+ retry_policy: @config.retry_policy
311
+
312
+ @network_security_stub.get_authorization_policy request, options do |result, operation|
313
+ yield result, operation if block_given?
314
+ return result
315
+ end
316
+ rescue ::Gapic::Rest::Error => e
317
+ raise ::Google::Cloud::Error.from_error(e)
318
+ end
319
+
320
+ ##
321
+ # Creates a new AuthorizationPolicy in a given project and location.
322
+ #
323
+ # @overload create_authorization_policy(request, options = nil)
324
+ # Pass arguments to `create_authorization_policy` via a request object, either of type
325
+ # {::Google::Cloud::NetworkSecurity::V1beta1::CreateAuthorizationPolicyRequest} or an equivalent Hash.
326
+ #
327
+ # @param request [::Google::Cloud::NetworkSecurity::V1beta1::CreateAuthorizationPolicyRequest, ::Hash]
328
+ # A request object representing the call parameters. Required. To specify no
329
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
330
+ # @param options [::Gapic::CallOptions, ::Hash]
331
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
332
+ #
333
+ # @overload create_authorization_policy(parent: nil, authorization_policy_id: nil, authorization_policy: nil)
334
+ # Pass arguments to `create_authorization_policy` via keyword arguments. Note that at
335
+ # least one keyword argument is required. To specify no parameters, or to keep all
336
+ # the default parameter values, pass an empty Hash as a request object (see above).
337
+ #
338
+ # @param parent [::String]
339
+ # Required. The parent resource of the AuthorizationPolicy. Must be in the
340
+ # format `projects/{project}/locations/{location}`.
341
+ # @param authorization_policy_id [::String]
342
+ # Required. Short name of the AuthorizationPolicy resource to be created.
343
+ # This value should be 1-63 characters long, containing only
344
+ # letters, numbers, hyphens, and underscores, and should not start
345
+ # with a number. E.g. "authz_policy".
346
+ # @param authorization_policy [::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy, ::Hash]
347
+ # Required. AuthorizationPolicy resource to be created.
348
+ # @yield [result, operation] Access the result along with the TransportOperation object
349
+ # @yieldparam result [::Gapic::Operation]
350
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
351
+ #
352
+ # @return [::Gapic::Operation]
353
+ #
354
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
355
+ def create_authorization_policy request, options = nil
356
+ raise ::ArgumentError, "request must be provided" if request.nil?
357
+
358
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1beta1::CreateAuthorizationPolicyRequest
359
+
360
+ # Converts hash and nil to an options object
361
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
362
+
363
+ # Customize the options with defaults
364
+ call_metadata = @config.rpcs.create_authorization_policy.metadata.to_h
365
+
366
+ # Set x-goog-api-client and x-goog-user-project headers
367
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
368
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
369
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION,
370
+ transports_version_send: [:rest]
371
+
372
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
373
+
374
+ options.apply_defaults timeout: @config.rpcs.create_authorization_policy.timeout,
375
+ metadata: call_metadata,
376
+ retry_policy: @config.rpcs.create_authorization_policy.retry_policy
377
+
378
+ options.apply_defaults timeout: @config.timeout,
379
+ metadata: @config.metadata,
380
+ retry_policy: @config.retry_policy
381
+
382
+ @network_security_stub.create_authorization_policy request, options do |result, operation|
383
+ result = ::Gapic::Operation.new result, @operations_client, options: options
384
+ yield result, operation if block_given?
385
+ return result
386
+ end
387
+ rescue ::Gapic::Rest::Error => e
388
+ raise ::Google::Cloud::Error.from_error(e)
389
+ end
390
+
391
+ ##
392
+ # Updates the parameters of a single AuthorizationPolicy.
393
+ #
394
+ # @overload update_authorization_policy(request, options = nil)
395
+ # Pass arguments to `update_authorization_policy` via a request object, either of type
396
+ # {::Google::Cloud::NetworkSecurity::V1beta1::UpdateAuthorizationPolicyRequest} or an equivalent Hash.
397
+ #
398
+ # @param request [::Google::Cloud::NetworkSecurity::V1beta1::UpdateAuthorizationPolicyRequest, ::Hash]
399
+ # A request object representing the call parameters. Required. To specify no
400
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
401
+ # @param options [::Gapic::CallOptions, ::Hash]
402
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
403
+ #
404
+ # @overload update_authorization_policy(update_mask: nil, authorization_policy: nil)
405
+ # Pass arguments to `update_authorization_policy` via keyword arguments. Note that at
406
+ # least one keyword argument is required. To specify no parameters, or to keep all
407
+ # the default parameter values, pass an empty Hash as a request object (see above).
408
+ #
409
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
410
+ # Optional. Field mask is used to specify the fields to be overwritten in the
411
+ # AuthorizationPolicy resource by the update.
412
+ # The fields specified in the update_mask are relative to the resource, not
413
+ # the full request. A field will be overwritten if it is in the mask. If the
414
+ # user does not provide a mask then all fields will be overwritten.
415
+ # @param authorization_policy [::Google::Cloud::NetworkSecurity::V1beta1::AuthorizationPolicy, ::Hash]
416
+ # Required. Updated AuthorizationPolicy resource.
417
+ # @yield [result, operation] Access the result along with the TransportOperation object
418
+ # @yieldparam result [::Gapic::Operation]
419
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
420
+ #
421
+ # @return [::Gapic::Operation]
422
+ #
423
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
424
+ def update_authorization_policy request, options = nil
425
+ raise ::ArgumentError, "request must be provided" if request.nil?
426
+
427
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1beta1::UpdateAuthorizationPolicyRequest
428
+
429
+ # Converts hash and nil to an options object
430
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
431
+
432
+ # Customize the options with defaults
433
+ call_metadata = @config.rpcs.update_authorization_policy.metadata.to_h
434
+
435
+ # Set x-goog-api-client and x-goog-user-project headers
436
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
437
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
438
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION,
439
+ transports_version_send: [:rest]
440
+
441
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
442
+
443
+ options.apply_defaults timeout: @config.rpcs.update_authorization_policy.timeout,
444
+ metadata: call_metadata,
445
+ retry_policy: @config.rpcs.update_authorization_policy.retry_policy
446
+
447
+ options.apply_defaults timeout: @config.timeout,
448
+ metadata: @config.metadata,
449
+ retry_policy: @config.retry_policy
450
+
451
+ @network_security_stub.update_authorization_policy request, options do |result, operation|
452
+ result = ::Gapic::Operation.new result, @operations_client, options: options
453
+ yield result, operation if block_given?
454
+ return result
455
+ end
456
+ rescue ::Gapic::Rest::Error => e
457
+ raise ::Google::Cloud::Error.from_error(e)
458
+ end
459
+
460
+ ##
461
+ # Deletes a single AuthorizationPolicy.
462
+ #
463
+ # @overload delete_authorization_policy(request, options = nil)
464
+ # Pass arguments to `delete_authorization_policy` via a request object, either of type
465
+ # {::Google::Cloud::NetworkSecurity::V1beta1::DeleteAuthorizationPolicyRequest} or an equivalent Hash.
466
+ #
467
+ # @param request [::Google::Cloud::NetworkSecurity::V1beta1::DeleteAuthorizationPolicyRequest, ::Hash]
468
+ # A request object representing the call parameters. Required. To specify no
469
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
470
+ # @param options [::Gapic::CallOptions, ::Hash]
471
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
472
+ #
473
+ # @overload delete_authorization_policy(name: nil)
474
+ # Pass arguments to `delete_authorization_policy` via keyword arguments. Note that at
475
+ # least one keyword argument is required. To specify no parameters, or to keep all
476
+ # the default parameter values, pass an empty Hash as a request object (see above).
477
+ #
478
+ # @param name [::String]
479
+ # Required. A name of the AuthorizationPolicy to delete. Must be in the
480
+ # format `projects/{project}/locations/{location}/authorizationPolicies/*`.
481
+ # @yield [result, operation] Access the result along with the TransportOperation object
482
+ # @yieldparam result [::Gapic::Operation]
483
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
484
+ #
485
+ # @return [::Gapic::Operation]
486
+ #
487
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
488
+ def delete_authorization_policy request, options = nil
489
+ raise ::ArgumentError, "request must be provided" if request.nil?
490
+
491
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1beta1::DeleteAuthorizationPolicyRequest
492
+
493
+ # Converts hash and nil to an options object
494
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
495
+
496
+ # Customize the options with defaults
497
+ call_metadata = @config.rpcs.delete_authorization_policy.metadata.to_h
498
+
499
+ # Set x-goog-api-client and x-goog-user-project headers
500
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
501
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
502
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION,
503
+ transports_version_send: [:rest]
504
+
505
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
506
+
507
+ options.apply_defaults timeout: @config.rpcs.delete_authorization_policy.timeout,
508
+ metadata: call_metadata,
509
+ retry_policy: @config.rpcs.delete_authorization_policy.retry_policy
510
+
511
+ options.apply_defaults timeout: @config.timeout,
512
+ metadata: @config.metadata,
513
+ retry_policy: @config.retry_policy
514
+
515
+ @network_security_stub.delete_authorization_policy request, options do |result, operation|
516
+ result = ::Gapic::Operation.new result, @operations_client, options: options
517
+ yield result, operation if block_given?
518
+ return result
519
+ end
520
+ rescue ::Gapic::Rest::Error => e
521
+ raise ::Google::Cloud::Error.from_error(e)
522
+ end
523
+
524
+ ##
525
+ # Lists ServerTlsPolicies in a given project and location.
526
+ #
527
+ # @overload list_server_tls_policies(request, options = nil)
528
+ # Pass arguments to `list_server_tls_policies` via a request object, either of type
529
+ # {::Google::Cloud::NetworkSecurity::V1beta1::ListServerTlsPoliciesRequest} or an equivalent Hash.
530
+ #
531
+ # @param request [::Google::Cloud::NetworkSecurity::V1beta1::ListServerTlsPoliciesRequest, ::Hash]
532
+ # A request object representing the call parameters. Required. To specify no
533
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
534
+ # @param options [::Gapic::CallOptions, ::Hash]
535
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
536
+ #
537
+ # @overload list_server_tls_policies(parent: nil, page_size: nil, page_token: nil)
538
+ # Pass arguments to `list_server_tls_policies` via keyword arguments. Note that at
539
+ # least one keyword argument is required. To specify no parameters, or to keep all
540
+ # the default parameter values, pass an empty Hash as a request object (see above).
541
+ #
542
+ # @param parent [::String]
543
+ # Required. The project and location from which the ServerTlsPolicies should
544
+ # be listed, specified in the format `projects/*/locations/{location}`.
545
+ # @param page_size [::Integer]
546
+ # Maximum number of ServerTlsPolicies to return per call.
547
+ # @param page_token [::String]
548
+ # The value returned by the last `ListServerTlsPoliciesResponse`
549
+ # Indicates that this is a continuation of a prior
550
+ # `ListServerTlsPolicies` call, and that the system
551
+ # should return the next page of data.
552
+ # @yield [result, operation] Access the result along with the TransportOperation object
553
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy>]
554
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
555
+ #
556
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy>]
557
+ #
558
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
559
+ def list_server_tls_policies request, options = nil
560
+ raise ::ArgumentError, "request must be provided" if request.nil?
561
+
562
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1beta1::ListServerTlsPoliciesRequest
563
+
564
+ # Converts hash and nil to an options object
565
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
566
+
567
+ # Customize the options with defaults
568
+ call_metadata = @config.rpcs.list_server_tls_policies.metadata.to_h
569
+
570
+ # Set x-goog-api-client and x-goog-user-project headers
571
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
572
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
573
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION,
574
+ transports_version_send: [:rest]
575
+
576
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
577
+
578
+ options.apply_defaults timeout: @config.rpcs.list_server_tls_policies.timeout,
579
+ metadata: call_metadata,
580
+ retry_policy: @config.rpcs.list_server_tls_policies.retry_policy
581
+
582
+ options.apply_defaults timeout: @config.timeout,
583
+ metadata: @config.metadata,
584
+ retry_policy: @config.retry_policy
585
+
586
+ @network_security_stub.list_server_tls_policies request, options do |result, operation|
587
+ result = ::Gapic::Rest::PagedEnumerable.new @network_security_stub, :list_server_tls_policies, "server_tls_policies", request, result, options
588
+ yield result, operation if block_given?
589
+ return result
590
+ end
591
+ rescue ::Gapic::Rest::Error => e
592
+ raise ::Google::Cloud::Error.from_error(e)
593
+ end
594
+
595
+ ##
596
+ # Gets details of a single ServerTlsPolicy.
597
+ #
598
+ # @overload get_server_tls_policy(request, options = nil)
599
+ # Pass arguments to `get_server_tls_policy` via a request object, either of type
600
+ # {::Google::Cloud::NetworkSecurity::V1beta1::GetServerTlsPolicyRequest} or an equivalent Hash.
601
+ #
602
+ # @param request [::Google::Cloud::NetworkSecurity::V1beta1::GetServerTlsPolicyRequest, ::Hash]
603
+ # A request object representing the call parameters. Required. To specify no
604
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
605
+ # @param options [::Gapic::CallOptions, ::Hash]
606
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
607
+ #
608
+ # @overload get_server_tls_policy(name: nil)
609
+ # Pass arguments to `get_server_tls_policy` via keyword arguments. Note that at
610
+ # least one keyword argument is required. To specify no parameters, or to keep all
611
+ # the default parameter values, pass an empty Hash as a request object (see above).
612
+ #
613
+ # @param name [::String]
614
+ # Required. A name of the ServerTlsPolicy to get. Must be in the format
615
+ # `projects/*/locations/{location}/serverTlsPolicies/*`.
616
+ # @yield [result, operation] Access the result along with the TransportOperation object
617
+ # @yieldparam result [::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy]
618
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
619
+ #
620
+ # @return [::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy]
621
+ #
622
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
623
+ def get_server_tls_policy request, options = nil
624
+ raise ::ArgumentError, "request must be provided" if request.nil?
625
+
626
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1beta1::GetServerTlsPolicyRequest
627
+
628
+ # Converts hash and nil to an options object
629
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
630
+
631
+ # Customize the options with defaults
632
+ call_metadata = @config.rpcs.get_server_tls_policy.metadata.to_h
633
+
634
+ # Set x-goog-api-client and x-goog-user-project headers
635
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
636
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
637
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION,
638
+ transports_version_send: [:rest]
639
+
640
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
641
+
642
+ options.apply_defaults timeout: @config.rpcs.get_server_tls_policy.timeout,
643
+ metadata: call_metadata,
644
+ retry_policy: @config.rpcs.get_server_tls_policy.retry_policy
645
+
646
+ options.apply_defaults timeout: @config.timeout,
647
+ metadata: @config.metadata,
648
+ retry_policy: @config.retry_policy
649
+
650
+ @network_security_stub.get_server_tls_policy request, options do |result, operation|
651
+ yield result, operation if block_given?
652
+ return result
653
+ end
654
+ rescue ::Gapic::Rest::Error => e
655
+ raise ::Google::Cloud::Error.from_error(e)
656
+ end
657
+
658
+ ##
659
+ # Creates a new ServerTlsPolicy in a given project and location.
660
+ #
661
+ # @overload create_server_tls_policy(request, options = nil)
662
+ # Pass arguments to `create_server_tls_policy` via a request object, either of type
663
+ # {::Google::Cloud::NetworkSecurity::V1beta1::CreateServerTlsPolicyRequest} or an equivalent Hash.
664
+ #
665
+ # @param request [::Google::Cloud::NetworkSecurity::V1beta1::CreateServerTlsPolicyRequest, ::Hash]
666
+ # A request object representing the call parameters. Required. To specify no
667
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
668
+ # @param options [::Gapic::CallOptions, ::Hash]
669
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
670
+ #
671
+ # @overload create_server_tls_policy(parent: nil, server_tls_policy_id: nil, server_tls_policy: nil)
672
+ # Pass arguments to `create_server_tls_policy` via keyword arguments. Note that at
673
+ # least one keyword argument is required. To specify no parameters, or to keep all
674
+ # the default parameter values, pass an empty Hash as a request object (see above).
675
+ #
676
+ # @param parent [::String]
677
+ # Required. The parent resource of the ServerTlsPolicy. Must be in
678
+ # the format `projects/*/locations/{location}`.
679
+ # @param server_tls_policy_id [::String]
680
+ # Required. Short name of the ServerTlsPolicy resource to be created. This
681
+ # value should be 1-63 characters long, containing only letters, numbers,
682
+ # hyphens, and underscores, and should not start with a number. E.g.
683
+ # "server_mtls_policy".
684
+ # @param server_tls_policy [::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy, ::Hash]
685
+ # Required. ServerTlsPolicy resource to be created.
686
+ # @yield [result, operation] Access the result along with the TransportOperation object
687
+ # @yieldparam result [::Gapic::Operation]
688
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
689
+ #
690
+ # @return [::Gapic::Operation]
691
+ #
692
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
693
+ def create_server_tls_policy request, options = nil
694
+ raise ::ArgumentError, "request must be provided" if request.nil?
695
+
696
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1beta1::CreateServerTlsPolicyRequest
697
+
698
+ # Converts hash and nil to an options object
699
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
700
+
701
+ # Customize the options with defaults
702
+ call_metadata = @config.rpcs.create_server_tls_policy.metadata.to_h
703
+
704
+ # Set x-goog-api-client and x-goog-user-project headers
705
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
706
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
707
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION,
708
+ transports_version_send: [:rest]
709
+
710
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
711
+
712
+ options.apply_defaults timeout: @config.rpcs.create_server_tls_policy.timeout,
713
+ metadata: call_metadata,
714
+ retry_policy: @config.rpcs.create_server_tls_policy.retry_policy
715
+
716
+ options.apply_defaults timeout: @config.timeout,
717
+ metadata: @config.metadata,
718
+ retry_policy: @config.retry_policy
719
+
720
+ @network_security_stub.create_server_tls_policy request, options do |result, operation|
721
+ result = ::Gapic::Operation.new result, @operations_client, options: options
722
+ yield result, operation if block_given?
723
+ return result
724
+ end
725
+ rescue ::Gapic::Rest::Error => e
726
+ raise ::Google::Cloud::Error.from_error(e)
727
+ end
728
+
729
+ ##
730
+ # Updates the parameters of a single ServerTlsPolicy.
731
+ #
732
+ # @overload update_server_tls_policy(request, options = nil)
733
+ # Pass arguments to `update_server_tls_policy` via a request object, either of type
734
+ # {::Google::Cloud::NetworkSecurity::V1beta1::UpdateServerTlsPolicyRequest} or an equivalent Hash.
735
+ #
736
+ # @param request [::Google::Cloud::NetworkSecurity::V1beta1::UpdateServerTlsPolicyRequest, ::Hash]
737
+ # A request object representing the call parameters. Required. To specify no
738
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
739
+ # @param options [::Gapic::CallOptions, ::Hash]
740
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
741
+ #
742
+ # @overload update_server_tls_policy(update_mask: nil, server_tls_policy: nil)
743
+ # Pass arguments to `update_server_tls_policy` via keyword arguments. Note that at
744
+ # least one keyword argument is required. To specify no parameters, or to keep all
745
+ # the default parameter values, pass an empty Hash as a request object (see above).
746
+ #
747
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
748
+ # Optional. Field mask is used to specify the fields to be overwritten in the
749
+ # ServerTlsPolicy resource by the update. The fields
750
+ # specified in the update_mask are relative to the resource, not
751
+ # the full request. A field will be overwritten if it is in the
752
+ # mask. If the user does not provide a mask then all fields will be
753
+ # overwritten.
754
+ # @param server_tls_policy [::Google::Cloud::NetworkSecurity::V1beta1::ServerTlsPolicy, ::Hash]
755
+ # Required. Updated ServerTlsPolicy resource.
756
+ # @yield [result, operation] Access the result along with the TransportOperation object
757
+ # @yieldparam result [::Gapic::Operation]
758
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
759
+ #
760
+ # @return [::Gapic::Operation]
761
+ #
762
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
763
+ def update_server_tls_policy request, options = nil
764
+ raise ::ArgumentError, "request must be provided" if request.nil?
765
+
766
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1beta1::UpdateServerTlsPolicyRequest
767
+
768
+ # Converts hash and nil to an options object
769
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
770
+
771
+ # Customize the options with defaults
772
+ call_metadata = @config.rpcs.update_server_tls_policy.metadata.to_h
773
+
774
+ # Set x-goog-api-client and x-goog-user-project headers
775
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
776
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
777
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION,
778
+ transports_version_send: [:rest]
779
+
780
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
781
+
782
+ options.apply_defaults timeout: @config.rpcs.update_server_tls_policy.timeout,
783
+ metadata: call_metadata,
784
+ retry_policy: @config.rpcs.update_server_tls_policy.retry_policy
785
+
786
+ options.apply_defaults timeout: @config.timeout,
787
+ metadata: @config.metadata,
788
+ retry_policy: @config.retry_policy
789
+
790
+ @network_security_stub.update_server_tls_policy request, options do |result, operation|
791
+ result = ::Gapic::Operation.new result, @operations_client, options: options
792
+ yield result, operation if block_given?
793
+ return result
794
+ end
795
+ rescue ::Gapic::Rest::Error => e
796
+ raise ::Google::Cloud::Error.from_error(e)
797
+ end
798
+
799
+ ##
800
+ # Deletes a single ServerTlsPolicy.
801
+ #
802
+ # @overload delete_server_tls_policy(request, options = nil)
803
+ # Pass arguments to `delete_server_tls_policy` via a request object, either of type
804
+ # {::Google::Cloud::NetworkSecurity::V1beta1::DeleteServerTlsPolicyRequest} or an equivalent Hash.
805
+ #
806
+ # @param request [::Google::Cloud::NetworkSecurity::V1beta1::DeleteServerTlsPolicyRequest, ::Hash]
807
+ # A request object representing the call parameters. Required. To specify no
808
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
809
+ # @param options [::Gapic::CallOptions, ::Hash]
810
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
811
+ #
812
+ # @overload delete_server_tls_policy(name: nil)
813
+ # Pass arguments to `delete_server_tls_policy` via keyword arguments. Note that at
814
+ # least one keyword argument is required. To specify no parameters, or to keep all
815
+ # the default parameter values, pass an empty Hash as a request object (see above).
816
+ #
817
+ # @param name [::String]
818
+ # Required. A name of the ServerTlsPolicy to delete. Must be in
819
+ # the format `projects/*/locations/{location}/serverTlsPolicies/*`.
820
+ # @yield [result, operation] Access the result along with the TransportOperation object
821
+ # @yieldparam result [::Gapic::Operation]
822
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
823
+ #
824
+ # @return [::Gapic::Operation]
825
+ #
826
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
827
+ def delete_server_tls_policy request, options = nil
828
+ raise ::ArgumentError, "request must be provided" if request.nil?
829
+
830
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1beta1::DeleteServerTlsPolicyRequest
831
+
832
+ # Converts hash and nil to an options object
833
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
834
+
835
+ # Customize the options with defaults
836
+ call_metadata = @config.rpcs.delete_server_tls_policy.metadata.to_h
837
+
838
+ # Set x-goog-api-client and x-goog-user-project headers
839
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
840
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
841
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION,
842
+ transports_version_send: [:rest]
843
+
844
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
845
+
846
+ options.apply_defaults timeout: @config.rpcs.delete_server_tls_policy.timeout,
847
+ metadata: call_metadata,
848
+ retry_policy: @config.rpcs.delete_server_tls_policy.retry_policy
849
+
850
+ options.apply_defaults timeout: @config.timeout,
851
+ metadata: @config.metadata,
852
+ retry_policy: @config.retry_policy
853
+
854
+ @network_security_stub.delete_server_tls_policy request, options do |result, operation|
855
+ result = ::Gapic::Operation.new result, @operations_client, options: options
856
+ yield result, operation if block_given?
857
+ return result
858
+ end
859
+ rescue ::Gapic::Rest::Error => e
860
+ raise ::Google::Cloud::Error.from_error(e)
861
+ end
862
+
863
+ ##
864
+ # Lists ClientTlsPolicies in a given project and location.
865
+ #
866
+ # @overload list_client_tls_policies(request, options = nil)
867
+ # Pass arguments to `list_client_tls_policies` via a request object, either of type
868
+ # {::Google::Cloud::NetworkSecurity::V1beta1::ListClientTlsPoliciesRequest} or an equivalent Hash.
869
+ #
870
+ # @param request [::Google::Cloud::NetworkSecurity::V1beta1::ListClientTlsPoliciesRequest, ::Hash]
871
+ # A request object representing the call parameters. Required. To specify no
872
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
873
+ # @param options [::Gapic::CallOptions, ::Hash]
874
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
875
+ #
876
+ # @overload list_client_tls_policies(parent: nil, page_size: nil, page_token: nil)
877
+ # Pass arguments to `list_client_tls_policies` via keyword arguments. Note that at
878
+ # least one keyword argument is required. To specify no parameters, or to keep all
879
+ # the default parameter values, pass an empty Hash as a request object (see above).
880
+ #
881
+ # @param parent [::String]
882
+ # Required. The project and location from which the ClientTlsPolicies should
883
+ # be listed, specified in the format `projects/*/locations/{location}`.
884
+ # @param page_size [::Integer]
885
+ # Maximum number of ClientTlsPolicies to return per call.
886
+ # @param page_token [::String]
887
+ # The value returned by the last `ListClientTlsPoliciesResponse`
888
+ # Indicates that this is a continuation of a prior
889
+ # `ListClientTlsPolicies` call, and that the system
890
+ # should return the next page of data.
891
+ # @yield [result, operation] Access the result along with the TransportOperation object
892
+ # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy>]
893
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
894
+ #
895
+ # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy>]
896
+ #
897
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
898
+ def list_client_tls_policies request, options = nil
899
+ raise ::ArgumentError, "request must be provided" if request.nil?
900
+
901
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1beta1::ListClientTlsPoliciesRequest
902
+
903
+ # Converts hash and nil to an options object
904
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
905
+
906
+ # Customize the options with defaults
907
+ call_metadata = @config.rpcs.list_client_tls_policies.metadata.to_h
908
+
909
+ # Set x-goog-api-client and x-goog-user-project headers
910
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
911
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
912
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION,
913
+ transports_version_send: [:rest]
914
+
915
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
916
+
917
+ options.apply_defaults timeout: @config.rpcs.list_client_tls_policies.timeout,
918
+ metadata: call_metadata,
919
+ retry_policy: @config.rpcs.list_client_tls_policies.retry_policy
920
+
921
+ options.apply_defaults timeout: @config.timeout,
922
+ metadata: @config.metadata,
923
+ retry_policy: @config.retry_policy
924
+
925
+ @network_security_stub.list_client_tls_policies request, options do |result, operation|
926
+ result = ::Gapic::Rest::PagedEnumerable.new @network_security_stub, :list_client_tls_policies, "client_tls_policies", request, result, options
927
+ yield result, operation if block_given?
928
+ return result
929
+ end
930
+ rescue ::Gapic::Rest::Error => e
931
+ raise ::Google::Cloud::Error.from_error(e)
932
+ end
933
+
934
+ ##
935
+ # Gets details of a single ClientTlsPolicy.
936
+ #
937
+ # @overload get_client_tls_policy(request, options = nil)
938
+ # Pass arguments to `get_client_tls_policy` via a request object, either of type
939
+ # {::Google::Cloud::NetworkSecurity::V1beta1::GetClientTlsPolicyRequest} or an equivalent Hash.
940
+ #
941
+ # @param request [::Google::Cloud::NetworkSecurity::V1beta1::GetClientTlsPolicyRequest, ::Hash]
942
+ # A request object representing the call parameters. Required. To specify no
943
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
944
+ # @param options [::Gapic::CallOptions, ::Hash]
945
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
946
+ #
947
+ # @overload get_client_tls_policy(name: nil)
948
+ # Pass arguments to `get_client_tls_policy` via keyword arguments. Note that at
949
+ # least one keyword argument is required. To specify no parameters, or to keep all
950
+ # the default parameter values, pass an empty Hash as a request object (see above).
951
+ #
952
+ # @param name [::String]
953
+ # Required. A name of the ClientTlsPolicy to get. Must be in the format
954
+ # `projects/*/locations/{location}/clientTlsPolicies/*`.
955
+ # @yield [result, operation] Access the result along with the TransportOperation object
956
+ # @yieldparam result [::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy]
957
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
958
+ #
959
+ # @return [::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy]
960
+ #
961
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
962
+ def get_client_tls_policy request, options = nil
963
+ raise ::ArgumentError, "request must be provided" if request.nil?
964
+
965
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1beta1::GetClientTlsPolicyRequest
966
+
967
+ # Converts hash and nil to an options object
968
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
969
+
970
+ # Customize the options with defaults
971
+ call_metadata = @config.rpcs.get_client_tls_policy.metadata.to_h
972
+
973
+ # Set x-goog-api-client and x-goog-user-project headers
974
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
975
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
976
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION,
977
+ transports_version_send: [:rest]
978
+
979
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
980
+
981
+ options.apply_defaults timeout: @config.rpcs.get_client_tls_policy.timeout,
982
+ metadata: call_metadata,
983
+ retry_policy: @config.rpcs.get_client_tls_policy.retry_policy
984
+
985
+ options.apply_defaults timeout: @config.timeout,
986
+ metadata: @config.metadata,
987
+ retry_policy: @config.retry_policy
988
+
989
+ @network_security_stub.get_client_tls_policy request, options do |result, operation|
990
+ yield result, operation if block_given?
991
+ return result
992
+ end
993
+ rescue ::Gapic::Rest::Error => e
994
+ raise ::Google::Cloud::Error.from_error(e)
995
+ end
996
+
997
+ ##
998
+ # Creates a new ClientTlsPolicy in a given project and location.
999
+ #
1000
+ # @overload create_client_tls_policy(request, options = nil)
1001
+ # Pass arguments to `create_client_tls_policy` via a request object, either of type
1002
+ # {::Google::Cloud::NetworkSecurity::V1beta1::CreateClientTlsPolicyRequest} or an equivalent Hash.
1003
+ #
1004
+ # @param request [::Google::Cloud::NetworkSecurity::V1beta1::CreateClientTlsPolicyRequest, ::Hash]
1005
+ # A request object representing the call parameters. Required. To specify no
1006
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1007
+ # @param options [::Gapic::CallOptions, ::Hash]
1008
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1009
+ #
1010
+ # @overload create_client_tls_policy(parent: nil, client_tls_policy_id: nil, client_tls_policy: nil)
1011
+ # Pass arguments to `create_client_tls_policy` via keyword arguments. Note that at
1012
+ # least one keyword argument is required. To specify no parameters, or to keep all
1013
+ # the default parameter values, pass an empty Hash as a request object (see above).
1014
+ #
1015
+ # @param parent [::String]
1016
+ # Required. The parent resource of the ClientTlsPolicy. Must be in
1017
+ # the format `projects/*/locations/{location}`.
1018
+ # @param client_tls_policy_id [::String]
1019
+ # Required. Short name of the ClientTlsPolicy resource to be created. This
1020
+ # value should be 1-63 characters long, containing only letters, numbers,
1021
+ # hyphens, and underscores, and should not start with a number. E.g.
1022
+ # "client_mtls_policy".
1023
+ # @param client_tls_policy [::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy, ::Hash]
1024
+ # Required. ClientTlsPolicy resource to be created.
1025
+ # @yield [result, operation] Access the result along with the TransportOperation object
1026
+ # @yieldparam result [::Gapic::Operation]
1027
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1028
+ #
1029
+ # @return [::Gapic::Operation]
1030
+ #
1031
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1032
+ def create_client_tls_policy request, options = nil
1033
+ raise ::ArgumentError, "request must be provided" if request.nil?
1034
+
1035
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1beta1::CreateClientTlsPolicyRequest
1036
+
1037
+ # Converts hash and nil to an options object
1038
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1039
+
1040
+ # Customize the options with defaults
1041
+ call_metadata = @config.rpcs.create_client_tls_policy.metadata.to_h
1042
+
1043
+ # Set x-goog-api-client and x-goog-user-project headers
1044
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1045
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1046
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION,
1047
+ transports_version_send: [:rest]
1048
+
1049
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1050
+
1051
+ options.apply_defaults timeout: @config.rpcs.create_client_tls_policy.timeout,
1052
+ metadata: call_metadata,
1053
+ retry_policy: @config.rpcs.create_client_tls_policy.retry_policy
1054
+
1055
+ options.apply_defaults timeout: @config.timeout,
1056
+ metadata: @config.metadata,
1057
+ retry_policy: @config.retry_policy
1058
+
1059
+ @network_security_stub.create_client_tls_policy request, options do |result, operation|
1060
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1061
+ yield result, operation if block_given?
1062
+ return result
1063
+ end
1064
+ rescue ::Gapic::Rest::Error => e
1065
+ raise ::Google::Cloud::Error.from_error(e)
1066
+ end
1067
+
1068
+ ##
1069
+ # Updates the parameters of a single ClientTlsPolicy.
1070
+ #
1071
+ # @overload update_client_tls_policy(request, options = nil)
1072
+ # Pass arguments to `update_client_tls_policy` via a request object, either of type
1073
+ # {::Google::Cloud::NetworkSecurity::V1beta1::UpdateClientTlsPolicyRequest} or an equivalent Hash.
1074
+ #
1075
+ # @param request [::Google::Cloud::NetworkSecurity::V1beta1::UpdateClientTlsPolicyRequest, ::Hash]
1076
+ # A request object representing the call parameters. Required. To specify no
1077
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1078
+ # @param options [::Gapic::CallOptions, ::Hash]
1079
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1080
+ #
1081
+ # @overload update_client_tls_policy(update_mask: nil, client_tls_policy: nil)
1082
+ # Pass arguments to `update_client_tls_policy` via keyword arguments. Note that at
1083
+ # least one keyword argument is required. To specify no parameters, or to keep all
1084
+ # the default parameter values, pass an empty Hash as a request object (see above).
1085
+ #
1086
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
1087
+ # Optional. Field mask is used to specify the fields to be overwritten in the
1088
+ # ClientTlsPolicy resource by the update. The fields
1089
+ # specified in the update_mask are relative to the resource, not
1090
+ # the full request. A field will be overwritten if it is in the
1091
+ # mask. If the user does not provide a mask then all fields will be
1092
+ # overwritten.
1093
+ # @param client_tls_policy [::Google::Cloud::NetworkSecurity::V1beta1::ClientTlsPolicy, ::Hash]
1094
+ # Required. Updated ClientTlsPolicy resource.
1095
+ # @yield [result, operation] Access the result along with the TransportOperation object
1096
+ # @yieldparam result [::Gapic::Operation]
1097
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1098
+ #
1099
+ # @return [::Gapic::Operation]
1100
+ #
1101
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1102
+ def update_client_tls_policy request, options = nil
1103
+ raise ::ArgumentError, "request must be provided" if request.nil?
1104
+
1105
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1beta1::UpdateClientTlsPolicyRequest
1106
+
1107
+ # Converts hash and nil to an options object
1108
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1109
+
1110
+ # Customize the options with defaults
1111
+ call_metadata = @config.rpcs.update_client_tls_policy.metadata.to_h
1112
+
1113
+ # Set x-goog-api-client and x-goog-user-project headers
1114
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1115
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1116
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION,
1117
+ transports_version_send: [:rest]
1118
+
1119
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1120
+
1121
+ options.apply_defaults timeout: @config.rpcs.update_client_tls_policy.timeout,
1122
+ metadata: call_metadata,
1123
+ retry_policy: @config.rpcs.update_client_tls_policy.retry_policy
1124
+
1125
+ options.apply_defaults timeout: @config.timeout,
1126
+ metadata: @config.metadata,
1127
+ retry_policy: @config.retry_policy
1128
+
1129
+ @network_security_stub.update_client_tls_policy request, options do |result, operation|
1130
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1131
+ yield result, operation if block_given?
1132
+ return result
1133
+ end
1134
+ rescue ::Gapic::Rest::Error => e
1135
+ raise ::Google::Cloud::Error.from_error(e)
1136
+ end
1137
+
1138
+ ##
1139
+ # Deletes a single ClientTlsPolicy.
1140
+ #
1141
+ # @overload delete_client_tls_policy(request, options = nil)
1142
+ # Pass arguments to `delete_client_tls_policy` via a request object, either of type
1143
+ # {::Google::Cloud::NetworkSecurity::V1beta1::DeleteClientTlsPolicyRequest} or an equivalent Hash.
1144
+ #
1145
+ # @param request [::Google::Cloud::NetworkSecurity::V1beta1::DeleteClientTlsPolicyRequest, ::Hash]
1146
+ # A request object representing the call parameters. Required. To specify no
1147
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
1148
+ # @param options [::Gapic::CallOptions, ::Hash]
1149
+ # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
1150
+ #
1151
+ # @overload delete_client_tls_policy(name: nil)
1152
+ # Pass arguments to `delete_client_tls_policy` via keyword arguments. Note that at
1153
+ # least one keyword argument is required. To specify no parameters, or to keep all
1154
+ # the default parameter values, pass an empty Hash as a request object (see above).
1155
+ #
1156
+ # @param name [::String]
1157
+ # Required. A name of the ClientTlsPolicy to delete. Must be in
1158
+ # the format `projects/*/locations/{location}/clientTlsPolicies/*`.
1159
+ # @yield [result, operation] Access the result along with the TransportOperation object
1160
+ # @yieldparam result [::Gapic::Operation]
1161
+ # @yieldparam operation [::Gapic::Rest::TransportOperation]
1162
+ #
1163
+ # @return [::Gapic::Operation]
1164
+ #
1165
+ # @raise [::Google::Cloud::Error] if the REST call is aborted.
1166
+ def delete_client_tls_policy request, options = nil
1167
+ raise ::ArgumentError, "request must be provided" if request.nil?
1168
+
1169
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::NetworkSecurity::V1beta1::DeleteClientTlsPolicyRequest
1170
+
1171
+ # Converts hash and nil to an options object
1172
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
1173
+
1174
+ # Customize the options with defaults
1175
+ call_metadata = @config.rpcs.delete_client_tls_policy.metadata.to_h
1176
+
1177
+ # Set x-goog-api-client and x-goog-user-project headers
1178
+ call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
1179
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
1180
+ gapic_version: ::Google::Cloud::NetworkSecurity::V1beta1::VERSION,
1181
+ transports_version_send: [:rest]
1182
+
1183
+ call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1184
+
1185
+ options.apply_defaults timeout: @config.rpcs.delete_client_tls_policy.timeout,
1186
+ metadata: call_metadata,
1187
+ retry_policy: @config.rpcs.delete_client_tls_policy.retry_policy
1188
+
1189
+ options.apply_defaults timeout: @config.timeout,
1190
+ metadata: @config.metadata,
1191
+ retry_policy: @config.retry_policy
1192
+
1193
+ @network_security_stub.delete_client_tls_policy request, options do |result, operation|
1194
+ result = ::Gapic::Operation.new result, @operations_client, options: options
1195
+ yield result, operation if block_given?
1196
+ return result
1197
+ end
1198
+ rescue ::Gapic::Rest::Error => e
1199
+ raise ::Google::Cloud::Error.from_error(e)
1200
+ end
1201
+
1202
+ ##
1203
+ # Configuration class for the NetworkSecurity REST API.
1204
+ #
1205
+ # This class represents the configuration for NetworkSecurity REST,
1206
+ # providing control over timeouts, retry behavior, logging, transport
1207
+ # parameters, and other low-level controls. Certain parameters can also be
1208
+ # applied individually to specific RPCs. See
1209
+ # {::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Rest::Client::Configuration::Rpcs}
1210
+ # for a list of RPCs that can be configured independently.
1211
+ #
1212
+ # Configuration can be applied globally to all clients, or to a single client
1213
+ # on construction.
1214
+ #
1215
+ # @example
1216
+ #
1217
+ # # Modify the global config, setting the timeout for
1218
+ # # list_authorization_policies to 20 seconds,
1219
+ # # and all remaining timeouts to 10 seconds.
1220
+ # ::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Rest::Client.configure do |config|
1221
+ # config.timeout = 10.0
1222
+ # config.rpcs.list_authorization_policies.timeout = 20.0
1223
+ # end
1224
+ #
1225
+ # # Apply the above configuration only to a new client.
1226
+ # client = ::Google::Cloud::NetworkSecurity::V1beta1::NetworkSecurity::Rest::Client.new do |config|
1227
+ # config.timeout = 10.0
1228
+ # config.rpcs.list_authorization_policies.timeout = 20.0
1229
+ # end
1230
+ #
1231
+ # @!attribute [rw] endpoint
1232
+ # The hostname or hostname:port of the service endpoint.
1233
+ # Defaults to `"networksecurity.googleapis.com"`.
1234
+ # @return [::String]
1235
+ # @!attribute [rw] credentials
1236
+ # Credentials to send with calls. You may provide any of the following types:
1237
+ # * (`String`) The path to a service account key file in JSON format
1238
+ # * (`Hash`) A service account key as a Hash
1239
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
1240
+ # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
1241
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
1242
+ # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client))
1243
+ # * (`nil`) indicating no credentials
1244
+ # @return [::Object]
1245
+ # @!attribute [rw] scope
1246
+ # The OAuth scopes
1247
+ # @return [::Array<::String>]
1248
+ # @!attribute [rw] lib_name
1249
+ # The library name as recorded in instrumentation and logging
1250
+ # @return [::String]
1251
+ # @!attribute [rw] lib_version
1252
+ # The library version as recorded in instrumentation and logging
1253
+ # @return [::String]
1254
+ # @!attribute [rw] timeout
1255
+ # The call timeout in seconds.
1256
+ # @return [::Numeric]
1257
+ # @!attribute [rw] metadata
1258
+ # Additional headers to be sent with the call.
1259
+ # @return [::Hash{::Symbol=>::String}]
1260
+ # @!attribute [rw] retry_policy
1261
+ # The retry policy. The value is a hash with the following keys:
1262
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1263
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1264
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1265
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1266
+ # trigger a retry.
1267
+ # @return [::Hash]
1268
+ # @!attribute [rw] quota_project
1269
+ # A separate project against which to charge quota.
1270
+ # @return [::String]
1271
+ #
1272
+ class Configuration
1273
+ extend ::Gapic::Config
1274
+
1275
+ config_attr :endpoint, "networksecurity.googleapis.com", ::String
1276
+ config_attr :credentials, nil do |value|
1277
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1278
+ allowed.any? { |klass| klass === value }
1279
+ end
1280
+ config_attr :scope, nil, ::String, ::Array, nil
1281
+ config_attr :lib_name, nil, ::String, nil
1282
+ config_attr :lib_version, nil, ::String, nil
1283
+ config_attr :timeout, nil, ::Numeric, nil
1284
+ config_attr :metadata, nil, ::Hash, nil
1285
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1286
+ config_attr :quota_project, nil, ::String, nil
1287
+
1288
+ # @private
1289
+ # Overrides for http bindings for the RPCs of this service
1290
+ # are only used when this service is used as mixin, and only
1291
+ # by the host service.
1292
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1293
+ config_attr :bindings_override, {}, ::Hash, nil
1294
+
1295
+ # @private
1296
+ def initialize parent_config = nil
1297
+ @parent_config = parent_config unless parent_config.nil?
1298
+
1299
+ yield self if block_given?
1300
+ end
1301
+
1302
+ ##
1303
+ # Configurations for individual RPCs
1304
+ # @return [Rpcs]
1305
+ #
1306
+ def rpcs
1307
+ @rpcs ||= begin
1308
+ parent_rpcs = nil
1309
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
1310
+ Rpcs.new parent_rpcs
1311
+ end
1312
+ end
1313
+
1314
+ ##
1315
+ # Configuration RPC class for the NetworkSecurity API.
1316
+ #
1317
+ # Includes fields providing the configuration for each RPC in this service.
1318
+ # Each configuration object is of type `Gapic::Config::Method` and includes
1319
+ # the following configuration fields:
1320
+ #
1321
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
1322
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers
1323
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
1324
+ # include the following keys:
1325
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
1326
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
1327
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
1328
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
1329
+ # trigger a retry.
1330
+ #
1331
+ class Rpcs
1332
+ ##
1333
+ # RPC-specific configuration for `list_authorization_policies`
1334
+ # @return [::Gapic::Config::Method]
1335
+ #
1336
+ attr_reader :list_authorization_policies
1337
+ ##
1338
+ # RPC-specific configuration for `get_authorization_policy`
1339
+ # @return [::Gapic::Config::Method]
1340
+ #
1341
+ attr_reader :get_authorization_policy
1342
+ ##
1343
+ # RPC-specific configuration for `create_authorization_policy`
1344
+ # @return [::Gapic::Config::Method]
1345
+ #
1346
+ attr_reader :create_authorization_policy
1347
+ ##
1348
+ # RPC-specific configuration for `update_authorization_policy`
1349
+ # @return [::Gapic::Config::Method]
1350
+ #
1351
+ attr_reader :update_authorization_policy
1352
+ ##
1353
+ # RPC-specific configuration for `delete_authorization_policy`
1354
+ # @return [::Gapic::Config::Method]
1355
+ #
1356
+ attr_reader :delete_authorization_policy
1357
+ ##
1358
+ # RPC-specific configuration for `list_server_tls_policies`
1359
+ # @return [::Gapic::Config::Method]
1360
+ #
1361
+ attr_reader :list_server_tls_policies
1362
+ ##
1363
+ # RPC-specific configuration for `get_server_tls_policy`
1364
+ # @return [::Gapic::Config::Method]
1365
+ #
1366
+ attr_reader :get_server_tls_policy
1367
+ ##
1368
+ # RPC-specific configuration for `create_server_tls_policy`
1369
+ # @return [::Gapic::Config::Method]
1370
+ #
1371
+ attr_reader :create_server_tls_policy
1372
+ ##
1373
+ # RPC-specific configuration for `update_server_tls_policy`
1374
+ # @return [::Gapic::Config::Method]
1375
+ #
1376
+ attr_reader :update_server_tls_policy
1377
+ ##
1378
+ # RPC-specific configuration for `delete_server_tls_policy`
1379
+ # @return [::Gapic::Config::Method]
1380
+ #
1381
+ attr_reader :delete_server_tls_policy
1382
+ ##
1383
+ # RPC-specific configuration for `list_client_tls_policies`
1384
+ # @return [::Gapic::Config::Method]
1385
+ #
1386
+ attr_reader :list_client_tls_policies
1387
+ ##
1388
+ # RPC-specific configuration for `get_client_tls_policy`
1389
+ # @return [::Gapic::Config::Method]
1390
+ #
1391
+ attr_reader :get_client_tls_policy
1392
+ ##
1393
+ # RPC-specific configuration for `create_client_tls_policy`
1394
+ # @return [::Gapic::Config::Method]
1395
+ #
1396
+ attr_reader :create_client_tls_policy
1397
+ ##
1398
+ # RPC-specific configuration for `update_client_tls_policy`
1399
+ # @return [::Gapic::Config::Method]
1400
+ #
1401
+ attr_reader :update_client_tls_policy
1402
+ ##
1403
+ # RPC-specific configuration for `delete_client_tls_policy`
1404
+ # @return [::Gapic::Config::Method]
1405
+ #
1406
+ attr_reader :delete_client_tls_policy
1407
+
1408
+ # @private
1409
+ def initialize parent_rpcs = nil
1410
+ list_authorization_policies_config = parent_rpcs.list_authorization_policies if parent_rpcs.respond_to? :list_authorization_policies
1411
+ @list_authorization_policies = ::Gapic::Config::Method.new list_authorization_policies_config
1412
+ get_authorization_policy_config = parent_rpcs.get_authorization_policy if parent_rpcs.respond_to? :get_authorization_policy
1413
+ @get_authorization_policy = ::Gapic::Config::Method.new get_authorization_policy_config
1414
+ create_authorization_policy_config = parent_rpcs.create_authorization_policy if parent_rpcs.respond_to? :create_authorization_policy
1415
+ @create_authorization_policy = ::Gapic::Config::Method.new create_authorization_policy_config
1416
+ update_authorization_policy_config = parent_rpcs.update_authorization_policy if parent_rpcs.respond_to? :update_authorization_policy
1417
+ @update_authorization_policy = ::Gapic::Config::Method.new update_authorization_policy_config
1418
+ delete_authorization_policy_config = parent_rpcs.delete_authorization_policy if parent_rpcs.respond_to? :delete_authorization_policy
1419
+ @delete_authorization_policy = ::Gapic::Config::Method.new delete_authorization_policy_config
1420
+ list_server_tls_policies_config = parent_rpcs.list_server_tls_policies if parent_rpcs.respond_to? :list_server_tls_policies
1421
+ @list_server_tls_policies = ::Gapic::Config::Method.new list_server_tls_policies_config
1422
+ get_server_tls_policy_config = parent_rpcs.get_server_tls_policy if parent_rpcs.respond_to? :get_server_tls_policy
1423
+ @get_server_tls_policy = ::Gapic::Config::Method.new get_server_tls_policy_config
1424
+ create_server_tls_policy_config = parent_rpcs.create_server_tls_policy if parent_rpcs.respond_to? :create_server_tls_policy
1425
+ @create_server_tls_policy = ::Gapic::Config::Method.new create_server_tls_policy_config
1426
+ update_server_tls_policy_config = parent_rpcs.update_server_tls_policy if parent_rpcs.respond_to? :update_server_tls_policy
1427
+ @update_server_tls_policy = ::Gapic::Config::Method.new update_server_tls_policy_config
1428
+ delete_server_tls_policy_config = parent_rpcs.delete_server_tls_policy if parent_rpcs.respond_to? :delete_server_tls_policy
1429
+ @delete_server_tls_policy = ::Gapic::Config::Method.new delete_server_tls_policy_config
1430
+ list_client_tls_policies_config = parent_rpcs.list_client_tls_policies if parent_rpcs.respond_to? :list_client_tls_policies
1431
+ @list_client_tls_policies = ::Gapic::Config::Method.new list_client_tls_policies_config
1432
+ get_client_tls_policy_config = parent_rpcs.get_client_tls_policy if parent_rpcs.respond_to? :get_client_tls_policy
1433
+ @get_client_tls_policy = ::Gapic::Config::Method.new get_client_tls_policy_config
1434
+ create_client_tls_policy_config = parent_rpcs.create_client_tls_policy if parent_rpcs.respond_to? :create_client_tls_policy
1435
+ @create_client_tls_policy = ::Gapic::Config::Method.new create_client_tls_policy_config
1436
+ update_client_tls_policy_config = parent_rpcs.update_client_tls_policy if parent_rpcs.respond_to? :update_client_tls_policy
1437
+ @update_client_tls_policy = ::Gapic::Config::Method.new update_client_tls_policy_config
1438
+ delete_client_tls_policy_config = parent_rpcs.delete_client_tls_policy if parent_rpcs.respond_to? :delete_client_tls_policy
1439
+ @delete_client_tls_policy = ::Gapic::Config::Method.new delete_client_tls_policy_config
1440
+
1441
+ yield self if block_given?
1442
+ end
1443
+ end
1444
+ end
1445
+ end
1446
+ end
1447
+ end
1448
+ end
1449
+ end
1450
+ end
1451
+ end