google-cloud-beyond_corp-app_connectors-v1 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +12 -0
  3. data/AUTHENTICATION.md +149 -0
  4. data/LICENSE.md +201 -0
  5. data/README.md +144 -0
  6. data/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/client.rb +1049 -0
  7. data/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/credentials.rb +49 -0
  8. data/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/operations.rb +772 -0
  9. data/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service/paths.rb +71 -0
  10. data/lib/google/cloud/beyond_corp/app_connectors/v1/app_connectors_service.rb +65 -0
  11. data/lib/google/cloud/beyond_corp/app_connectors/v1/version.rb +30 -0
  12. data/lib/google/cloud/beyond_corp/app_connectors/v1.rb +42 -0
  13. data/lib/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config_pb.rb +45 -0
  14. data/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_pb.rb +117 -0
  15. data/lib/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb.rb +70 -0
  16. data/lib/google/cloud/beyondcorp/appconnectors/v1/resource_info_pb.rb +40 -0
  17. data/lib/google-cloud-beyond_corp-app_connectors-v1.rb +21 -0
  18. data/proto_docs/README.md +4 -0
  19. data/proto_docs/google/api/field_behavior.rb +71 -0
  20. data/proto_docs/google/api/resource.rb +222 -0
  21. data/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connector_instance_config.rb +82 -0
  22. data/proto_docs/google/cloud/beyondcorp/appconnectors/v1/app_connectors_service.rb +341 -0
  23. data/proto_docs/google/cloud/beyondcorp/appconnectors/v1/resource_info.rb +78 -0
  24. data/proto_docs/google/longrunning/operations.rb +164 -0
  25. data/proto_docs/google/protobuf/any.rb +141 -0
  26. data/proto_docs/google/protobuf/duration.rb +98 -0
  27. data/proto_docs/google/protobuf/empty.rb +34 -0
  28. data/proto_docs/google/protobuf/field_mask.rb +229 -0
  29. data/proto_docs/google/protobuf/timestamp.rb +129 -0
  30. data/proto_docs/google/rpc/status.rb +46 -0
  31. data/proto_docs/google/type/expr.rb +75 -0
  32. metadata +264 -0
@@ -0,0 +1,1049 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2022 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/beyondcorp/appconnectors/v1/app_connectors_service_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1"
23
+
24
+ module Google
25
+ module Cloud
26
+ module BeyondCorp
27
+ module AppConnectors
28
+ module V1
29
+ module AppConnectorsService
30
+ ##
31
+ # Client for the AppConnectorsService service.
32
+ #
33
+ # ## API Overview
34
+ #
35
+ # The `beyondcorp.googleapis.com` service implements the Google Cloud
36
+ # BeyondCorp API.
37
+ #
38
+ # ## Data Model
39
+ #
40
+ # The AppConnectorsService exposes the following resource:
41
+ #
42
+ # * AppConnectors, named as follows:
43
+ # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`.
44
+ #
45
+ # The AppConnectorsService provides methods to manage
46
+ # (create/read/update/delete) BeyondCorp AppConnectors.
47
+ #
48
+ class Client
49
+ include Paths
50
+
51
+ # @private
52
+ attr_reader :app_connectors_service_stub
53
+
54
+ ##
55
+ # Configure the AppConnectorsService Client class.
56
+ #
57
+ # See {::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client::Configuration}
58
+ # for a description of the configuration fields.
59
+ #
60
+ # @example
61
+ #
62
+ # # Modify the configuration for all AppConnectorsService clients
63
+ # ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.configure do |config|
64
+ # config.timeout = 10.0
65
+ # end
66
+ #
67
+ # @yield [config] Configure the Client client.
68
+ # @yieldparam config [Client::Configuration]
69
+ #
70
+ # @return [Client::Configuration]
71
+ #
72
+ def self.configure
73
+ @configure ||= begin
74
+ namespace = ["Google", "Cloud", "BeyondCorp", "AppConnectors", "V1"]
75
+ parent_config = while namespace.any?
76
+ parent_name = namespace.join "::"
77
+ parent_const = const_get parent_name
78
+ break parent_const.configure if parent_const.respond_to? :configure
79
+ namespace.pop
80
+ end
81
+ default_config = Client::Configuration.new parent_config
82
+
83
+ default_config
84
+ end
85
+ yield @configure if block_given?
86
+ @configure
87
+ end
88
+
89
+ ##
90
+ # Configure the AppConnectorsService Client instance.
91
+ #
92
+ # The configuration is set to the derived mode, meaning that values can be changed,
93
+ # but structural changes (adding new fields, etc.) are not allowed. Structural changes
94
+ # should be made on {Client.configure}.
95
+ #
96
+ # See {::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client::Configuration}
97
+ # for a description of the configuration fields.
98
+ #
99
+ # @yield [config] Configure the Client client.
100
+ # @yieldparam config [Client::Configuration]
101
+ #
102
+ # @return [Client::Configuration]
103
+ #
104
+ def configure
105
+ yield @config if block_given?
106
+ @config
107
+ end
108
+
109
+ ##
110
+ # Create a new AppConnectorsService client object.
111
+ #
112
+ # @example
113
+ #
114
+ # # Create a client using the default configuration
115
+ # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new
116
+ #
117
+ # # Create a client using a custom configuration
118
+ # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config|
119
+ # config.timeout = 10.0
120
+ # end
121
+ #
122
+ # @yield [config] Configure the AppConnectorsService client.
123
+ # @yieldparam config [Client::Configuration]
124
+ #
125
+ def initialize
126
+ # These require statements are intentionally placed here to initialize
127
+ # the gRPC module only when it's required.
128
+ # See https://github.com/googleapis/toolkit/issues/446
129
+ require "gapic/grpc"
130
+ require "google/cloud/beyondcorp/appconnectors/v1/app_connectors_service_services_pb"
131
+
132
+ # Create the configuration object
133
+ @config = Configuration.new Client.configure
134
+
135
+ # Yield the configuration if needed
136
+ yield @config if block_given?
137
+
138
+ # Create credentials
139
+ credentials = @config.credentials
140
+ # Use self-signed JWT if the endpoint is unchanged from default,
141
+ # but only if the default endpoint does not have a region prefix.
142
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
143
+ !@config.endpoint.split(".").first.include?("-")
144
+ credentials ||= Credentials.default scope: @config.scope,
145
+ enable_self_signed_jwt: enable_self_signed_jwt
146
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
147
+ credentials = Credentials.new credentials, scope: @config.scope
148
+ end
149
+ @quota_project_id = @config.quota_project
150
+ @quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
151
+
152
+ @operations_client = Operations.new do |config|
153
+ config.credentials = credentials
154
+ config.quota_project = @quota_project_id
155
+ config.endpoint = @config.endpoint
156
+ end
157
+
158
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
159
+ config.credentials = credentials
160
+ config.quota_project = @quota_project_id
161
+ config.endpoint = @config.endpoint
162
+ end
163
+
164
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
165
+ config.credentials = credentials
166
+ config.quota_project = @quota_project_id
167
+ config.endpoint = @config.endpoint
168
+ end
169
+
170
+ @app_connectors_service_stub = ::Gapic::ServiceStub.new(
171
+ ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Stub,
172
+ credentials: credentials,
173
+ endpoint: @config.endpoint,
174
+ channel_args: @config.channel_args,
175
+ interceptors: @config.interceptors
176
+ )
177
+ end
178
+
179
+ ##
180
+ # Get the associated client for long-running operations.
181
+ #
182
+ # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Operations]
183
+ #
184
+ attr_reader :operations_client
185
+
186
+ ##
187
+ # Get the associated client for mix-in of the Locations.
188
+ #
189
+ # @return [Google::Cloud::Location::Locations::Client]
190
+ #
191
+ attr_reader :location_client
192
+
193
+ ##
194
+ # Get the associated client for mix-in of the IAMPolicy.
195
+ #
196
+ # @return [Google::Iam::V1::IAMPolicy::Client]
197
+ #
198
+ attr_reader :iam_policy_client
199
+
200
+ # Service calls
201
+
202
+ ##
203
+ # Lists AppConnectors in a given project and location.
204
+ #
205
+ # @overload list_app_connectors(request, options = nil)
206
+ # Pass arguments to `list_app_connectors` via a request object, either of type
207
+ # {::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest} or an equivalent Hash.
208
+ #
209
+ # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest, ::Hash]
210
+ # A request object representing the call parameters. Required. To specify no
211
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
212
+ # @param options [::Gapic::CallOptions, ::Hash]
213
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
214
+ #
215
+ # @overload list_app_connectors(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil)
216
+ # Pass arguments to `list_app_connectors` via keyword arguments. Note that at
217
+ # least one keyword argument is required. To specify no parameters, or to keep all
218
+ # the default parameter values, pass an empty Hash as a request object (see above).
219
+ #
220
+ # @param parent [::String]
221
+ # Required. The resource name of the AppConnector location using the form:
222
+ # `projects/{project_id}/locations/{location_id}`
223
+ # @param page_size [::Integer]
224
+ # Optional. The maximum number of items to return.
225
+ # If not specified, a default value of 50 will be used by the service.
226
+ # Regardless of the page_size value, the response may include a partial list
227
+ # and a caller should only rely on response's
228
+ # [next_page_token][BeyondCorp.ListAppConnectorsResponse.next_page_token] to
229
+ # determine if there are more instances left to be queried.
230
+ # @param page_token [::String]
231
+ # Optional. The next_page_token value returned from a previous
232
+ # ListAppConnectorsRequest, if any.
233
+ # @param filter [::String]
234
+ # Optional. A filter specifying constraints of a list operation.
235
+ # @param order_by [::String]
236
+ # Optional. Specifies the ordering of results. See
237
+ # [Sorting
238
+ # order](https://cloud.google.com/apis/design/design_patterns#sorting_order)
239
+ # for more information.
240
+ #
241
+ # @yield [response, operation] Access the result along with the RPC operation
242
+ # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>]
243
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
244
+ #
245
+ # @return [::Gapic::PagedEnumerable<::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector>]
246
+ #
247
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
248
+ #
249
+ # @example Basic example
250
+ # require "google/cloud/beyond_corp/app_connectors/v1"
251
+ #
252
+ # # Create a client object. The client can be reused for multiple calls.
253
+ # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new
254
+ #
255
+ # # Create a request. To set request fields, pass in keyword arguments.
256
+ # request = Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest.new
257
+ #
258
+ # # Call the list_app_connectors method.
259
+ # result = client.list_app_connectors request
260
+ #
261
+ # # The returned object is of type Gapic::PagedEnumerable. You can
262
+ # # iterate over all elements by calling #each, and the enumerable
263
+ # # will lazily make API calls to fetch subsequent pages. Other
264
+ # # methods are also available for managing paging directly.
265
+ # result.each do |response|
266
+ # # Each element is of type ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector.
267
+ # p response
268
+ # end
269
+ #
270
+ def list_app_connectors request, options = nil
271
+ raise ::ArgumentError, "request must be provided" if request.nil?
272
+
273
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::ListAppConnectorsRequest
274
+
275
+ # Converts hash and nil to an options object
276
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
277
+
278
+ # Customize the options with defaults
279
+ metadata = @config.rpcs.list_app_connectors.metadata.to_h
280
+
281
+ # Set x-goog-api-client and x-goog-user-project headers
282
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
283
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
284
+ gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION
285
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
286
+
287
+ header_params = {}
288
+ if request.parent
289
+ header_params["parent"] = request.parent
290
+ end
291
+
292
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
293
+ metadata[:"x-goog-request-params"] ||= request_params_header
294
+
295
+ options.apply_defaults timeout: @config.rpcs.list_app_connectors.timeout,
296
+ metadata: metadata,
297
+ retry_policy: @config.rpcs.list_app_connectors.retry_policy
298
+
299
+ options.apply_defaults timeout: @config.timeout,
300
+ metadata: @config.metadata,
301
+ retry_policy: @config.retry_policy
302
+
303
+ @app_connectors_service_stub.call_rpc :list_app_connectors, request, options: options do |response, operation|
304
+ response = ::Gapic::PagedEnumerable.new @app_connectors_service_stub, :list_app_connectors, request, response, operation, options
305
+ yield response, operation if block_given?
306
+ return response
307
+ end
308
+ rescue ::GRPC::BadStatus => e
309
+ raise ::Google::Cloud::Error.from_error(e)
310
+ end
311
+
312
+ ##
313
+ # Gets details of a single AppConnector.
314
+ #
315
+ # @overload get_app_connector(request, options = nil)
316
+ # Pass arguments to `get_app_connector` via a request object, either of type
317
+ # {::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest} or an equivalent Hash.
318
+ #
319
+ # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest, ::Hash]
320
+ # A request object representing the call parameters. Required. To specify no
321
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
322
+ # @param options [::Gapic::CallOptions, ::Hash]
323
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
324
+ #
325
+ # @overload get_app_connector(name: nil)
326
+ # Pass arguments to `get_app_connector` via keyword arguments. Note that at
327
+ # least one keyword argument is required. To specify no parameters, or to keep all
328
+ # the default parameter values, pass an empty Hash as a request object (see above).
329
+ #
330
+ # @param name [::String]
331
+ # Required. BeyondCorp AppConnector name using the form:
332
+ # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`
333
+ #
334
+ # @yield [response, operation] Access the result along with the RPC operation
335
+ # @yieldparam response [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector]
336
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
337
+ #
338
+ # @return [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector]
339
+ #
340
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
341
+ #
342
+ # @example Basic example
343
+ # require "google/cloud/beyond_corp/app_connectors/v1"
344
+ #
345
+ # # Create a client object. The client can be reused for multiple calls.
346
+ # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new
347
+ #
348
+ # # Create a request. To set request fields, pass in keyword arguments.
349
+ # request = Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest.new
350
+ #
351
+ # # Call the get_app_connector method.
352
+ # result = client.get_app_connector request
353
+ #
354
+ # # The returned object is of type Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector.
355
+ # p result
356
+ #
357
+ def get_app_connector request, options = nil
358
+ raise ::ArgumentError, "request must be provided" if request.nil?
359
+
360
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::GetAppConnectorRequest
361
+
362
+ # Converts hash and nil to an options object
363
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
364
+
365
+ # Customize the options with defaults
366
+ metadata = @config.rpcs.get_app_connector.metadata.to_h
367
+
368
+ # Set x-goog-api-client and x-goog-user-project headers
369
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
370
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
371
+ gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION
372
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
373
+
374
+ header_params = {}
375
+ if request.name
376
+ header_params["name"] = request.name
377
+ end
378
+
379
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
380
+ metadata[:"x-goog-request-params"] ||= request_params_header
381
+
382
+ options.apply_defaults timeout: @config.rpcs.get_app_connector.timeout,
383
+ metadata: metadata,
384
+ retry_policy: @config.rpcs.get_app_connector.retry_policy
385
+
386
+ options.apply_defaults timeout: @config.timeout,
387
+ metadata: @config.metadata,
388
+ retry_policy: @config.retry_policy
389
+
390
+ @app_connectors_service_stub.call_rpc :get_app_connector, request, options: options do |response, operation|
391
+ yield response, operation if block_given?
392
+ return response
393
+ end
394
+ rescue ::GRPC::BadStatus => e
395
+ raise ::Google::Cloud::Error.from_error(e)
396
+ end
397
+
398
+ ##
399
+ # Creates a new AppConnector in a given project and location.
400
+ #
401
+ # @overload create_app_connector(request, options = nil)
402
+ # Pass arguments to `create_app_connector` via a request object, either of type
403
+ # {::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest} or an equivalent Hash.
404
+ #
405
+ # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest, ::Hash]
406
+ # A request object representing the call parameters. Required. To specify no
407
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
408
+ # @param options [::Gapic::CallOptions, ::Hash]
409
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
410
+ #
411
+ # @overload create_app_connector(parent: nil, app_connector_id: nil, app_connector: nil, request_id: nil, validate_only: nil)
412
+ # Pass arguments to `create_app_connector` via keyword arguments. Note that at
413
+ # least one keyword argument is required. To specify no parameters, or to keep all
414
+ # the default parameter values, pass an empty Hash as a request object (see above).
415
+ #
416
+ # @param parent [::String]
417
+ # Required. The resource project name of the AppConnector location using the
418
+ # form: `projects/{project_id}/locations/{location_id}`
419
+ # @param app_connector_id [::String]
420
+ # Optional. User-settable AppConnector resource ID.
421
+ #
422
+ # * Must start with a letter.
423
+ # * Must contain between 4-63 characters from `/[a-z][0-9]-/`.
424
+ # * Must end with a number or a letter.
425
+ # @param app_connector [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector, ::Hash]
426
+ # Required. A BeyondCorp AppConnector resource.
427
+ # @param request_id [::String]
428
+ # Optional. An optional request ID to identify requests. Specify a unique
429
+ # request ID so that if you must retry your request, the server will know to
430
+ # ignore the request if it has already been completed. The server will
431
+ # guarantee that for at least 60 minutes since the first request.
432
+ #
433
+ # For example, consider a situation where you make an initial request and t
434
+ # he request times out. If you make the request again with the same request
435
+ # ID, the server can check if original operation with the same request ID
436
+ # was received, and if so, will ignore the second request. This prevents
437
+ # clients from accidentally creating duplicate commitments.
438
+ #
439
+ # The request ID must be a valid UUID with the exception that zero UUID is
440
+ # not supported (00000000-0000-0000-0000-000000000000).
441
+ # @param validate_only [::Boolean]
442
+ # Optional. If set, validates request by executing a dry-run which would not
443
+ # alter the resource in any way.
444
+ #
445
+ # @yield [response, operation] Access the result along with the RPC operation
446
+ # @yieldparam response [::Gapic::Operation]
447
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
448
+ #
449
+ # @return [::Gapic::Operation]
450
+ #
451
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
452
+ #
453
+ # @example Basic example
454
+ # require "google/cloud/beyond_corp/app_connectors/v1"
455
+ #
456
+ # # Create a client object. The client can be reused for multiple calls.
457
+ # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new
458
+ #
459
+ # # Create a request. To set request fields, pass in keyword arguments.
460
+ # request = Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest.new
461
+ #
462
+ # # Call the create_app_connector method.
463
+ # result = client.create_app_connector request
464
+ #
465
+ # # The returned object is of type Gapic::Operation. You can use this
466
+ # # object to check the status of an operation, cancel it, or wait
467
+ # # for results. Here is how to block until completion:
468
+ # result.wait_until_done! timeout: 60
469
+ # if result.response?
470
+ # p result.response
471
+ # else
472
+ # puts "Error!"
473
+ # end
474
+ #
475
+ def create_app_connector request, options = nil
476
+ raise ::ArgumentError, "request must be provided" if request.nil?
477
+
478
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::CreateAppConnectorRequest
479
+
480
+ # Converts hash and nil to an options object
481
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
482
+
483
+ # Customize the options with defaults
484
+ metadata = @config.rpcs.create_app_connector.metadata.to_h
485
+
486
+ # Set x-goog-api-client and x-goog-user-project headers
487
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
488
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
489
+ gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION
490
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
491
+
492
+ header_params = {}
493
+ if request.parent
494
+ header_params["parent"] = request.parent
495
+ end
496
+
497
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
498
+ metadata[:"x-goog-request-params"] ||= request_params_header
499
+
500
+ options.apply_defaults timeout: @config.rpcs.create_app_connector.timeout,
501
+ metadata: metadata,
502
+ retry_policy: @config.rpcs.create_app_connector.retry_policy
503
+
504
+ options.apply_defaults timeout: @config.timeout,
505
+ metadata: @config.metadata,
506
+ retry_policy: @config.retry_policy
507
+
508
+ @app_connectors_service_stub.call_rpc :create_app_connector, request, options: options do |response, operation|
509
+ response = ::Gapic::Operation.new response, @operations_client, options: options
510
+ yield response, operation if block_given?
511
+ return response
512
+ end
513
+ rescue ::GRPC::BadStatus => e
514
+ raise ::Google::Cloud::Error.from_error(e)
515
+ end
516
+
517
+ ##
518
+ # Updates the parameters of a single AppConnector.
519
+ #
520
+ # @overload update_app_connector(request, options = nil)
521
+ # Pass arguments to `update_app_connector` via a request object, either of type
522
+ # {::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest} or an equivalent Hash.
523
+ #
524
+ # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest, ::Hash]
525
+ # A request object representing the call parameters. Required. To specify no
526
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
527
+ # @param options [::Gapic::CallOptions, ::Hash]
528
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
529
+ #
530
+ # @overload update_app_connector(update_mask: nil, app_connector: nil, request_id: nil, validate_only: nil)
531
+ # Pass arguments to `update_app_connector` via keyword arguments. Note that at
532
+ # least one keyword argument is required. To specify no parameters, or to keep all
533
+ # the default parameter values, pass an empty Hash as a request object (see above).
534
+ #
535
+ # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
536
+ # Required. Mask of fields to update. At least one path must be supplied in
537
+ # this field. The elements of the repeated paths field may only include these
538
+ # fields from [BeyondCorp.AppConnector]:
539
+ # * `labels`
540
+ # * `display_name`
541
+ # @param app_connector [::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnector, ::Hash]
542
+ # Required. AppConnector message with updated fields. Only supported fields
543
+ # specified in update_mask are updated.
544
+ # @param request_id [::String]
545
+ # Optional. An optional request ID to identify requests. Specify a unique
546
+ # request ID so that if you must retry your request, the server will know to
547
+ # ignore the request if it has already been completed. The server will
548
+ # guarantee that for at least 60 minutes since the first request.
549
+ #
550
+ # For example, consider a situation where you make an initial request and t
551
+ # he request times out. If you make the request again with the same request
552
+ # ID, the server can check if original operation with the same request ID
553
+ # was received, and if so, will ignore the second request. This prevents
554
+ # clients from accidentally creating duplicate commitments.
555
+ #
556
+ # The request ID must be a valid UUID with the exception that zero UUID is
557
+ # not supported (00000000-0000-0000-0000-000000000000).
558
+ # @param validate_only [::Boolean]
559
+ # Optional. If set, validates request by executing a dry-run which would not
560
+ # alter the resource in any way.
561
+ #
562
+ # @yield [response, operation] Access the result along with the RPC operation
563
+ # @yieldparam response [::Gapic::Operation]
564
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
565
+ #
566
+ # @return [::Gapic::Operation]
567
+ #
568
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
569
+ #
570
+ # @example Basic example
571
+ # require "google/cloud/beyond_corp/app_connectors/v1"
572
+ #
573
+ # # Create a client object. The client can be reused for multiple calls.
574
+ # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new
575
+ #
576
+ # # Create a request. To set request fields, pass in keyword arguments.
577
+ # request = Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest.new
578
+ #
579
+ # # Call the update_app_connector method.
580
+ # result = client.update_app_connector request
581
+ #
582
+ # # The returned object is of type Gapic::Operation. You can use this
583
+ # # object to check the status of an operation, cancel it, or wait
584
+ # # for results. Here is how to block until completion:
585
+ # result.wait_until_done! timeout: 60
586
+ # if result.response?
587
+ # p result.response
588
+ # else
589
+ # puts "Error!"
590
+ # end
591
+ #
592
+ def update_app_connector request, options = nil
593
+ raise ::ArgumentError, "request must be provided" if request.nil?
594
+
595
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::UpdateAppConnectorRequest
596
+
597
+ # Converts hash and nil to an options object
598
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
599
+
600
+ # Customize the options with defaults
601
+ metadata = @config.rpcs.update_app_connector.metadata.to_h
602
+
603
+ # Set x-goog-api-client and x-goog-user-project headers
604
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
605
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
606
+ gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION
607
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
608
+
609
+ header_params = {}
610
+ if request.app_connector&.name
611
+ header_params["app_connector.name"] = request.app_connector.name
612
+ end
613
+
614
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
615
+ metadata[:"x-goog-request-params"] ||= request_params_header
616
+
617
+ options.apply_defaults timeout: @config.rpcs.update_app_connector.timeout,
618
+ metadata: metadata,
619
+ retry_policy: @config.rpcs.update_app_connector.retry_policy
620
+
621
+ options.apply_defaults timeout: @config.timeout,
622
+ metadata: @config.metadata,
623
+ retry_policy: @config.retry_policy
624
+
625
+ @app_connectors_service_stub.call_rpc :update_app_connector, request, options: options do |response, operation|
626
+ response = ::Gapic::Operation.new response, @operations_client, options: options
627
+ yield response, operation if block_given?
628
+ return response
629
+ end
630
+ rescue ::GRPC::BadStatus => e
631
+ raise ::Google::Cloud::Error.from_error(e)
632
+ end
633
+
634
+ ##
635
+ # Deletes a single AppConnector.
636
+ #
637
+ # @overload delete_app_connector(request, options = nil)
638
+ # Pass arguments to `delete_app_connector` via a request object, either of type
639
+ # {::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest} or an equivalent Hash.
640
+ #
641
+ # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest, ::Hash]
642
+ # A request object representing the call parameters. Required. To specify no
643
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
644
+ # @param options [::Gapic::CallOptions, ::Hash]
645
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
646
+ #
647
+ # @overload delete_app_connector(name: nil, request_id: nil, validate_only: nil)
648
+ # Pass arguments to `delete_app_connector` via keyword arguments. Note that at
649
+ # least one keyword argument is required. To specify no parameters, or to keep all
650
+ # the default parameter values, pass an empty Hash as a request object (see above).
651
+ #
652
+ # @param name [::String]
653
+ # Required. BeyondCorp AppConnector name using the form:
654
+ # `projects/{project_id}/locations/{location_id}/appConnectors/{app_connector_id}`
655
+ # @param request_id [::String]
656
+ # Optional. An optional request ID to identify requests. Specify a unique
657
+ # request ID so that if you must retry your request, the server will know to
658
+ # ignore the request if it has already been completed. The server will
659
+ # guarantee that for at least 60 minutes after the first request.
660
+ #
661
+ # For example, consider a situation where you make an initial request and t
662
+ # he request times out. If you make the request again with the same request
663
+ # ID, the server can check if original operation with the same request ID
664
+ # was received, and if so, will ignore the second request. This prevents
665
+ # clients from accidentally creating duplicate commitments.
666
+ #
667
+ # The request ID must be a valid UUID with the exception that zero UUID is
668
+ # not supported (00000000-0000-0000-0000-000000000000).
669
+ # @param validate_only [::Boolean]
670
+ # Optional. If set, validates request by executing a dry-run which would not
671
+ # alter the resource in any way.
672
+ #
673
+ # @yield [response, operation] Access the result along with the RPC operation
674
+ # @yieldparam response [::Gapic::Operation]
675
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
676
+ #
677
+ # @return [::Gapic::Operation]
678
+ #
679
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
680
+ #
681
+ # @example Basic example
682
+ # require "google/cloud/beyond_corp/app_connectors/v1"
683
+ #
684
+ # # Create a client object. The client can be reused for multiple calls.
685
+ # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new
686
+ #
687
+ # # Create a request. To set request fields, pass in keyword arguments.
688
+ # request = Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest.new
689
+ #
690
+ # # Call the delete_app_connector method.
691
+ # result = client.delete_app_connector request
692
+ #
693
+ # # The returned object is of type Gapic::Operation. You can use this
694
+ # # object to check the status of an operation, cancel it, or wait
695
+ # # for results. Here is how to block until completion:
696
+ # result.wait_until_done! timeout: 60
697
+ # if result.response?
698
+ # p result.response
699
+ # else
700
+ # puts "Error!"
701
+ # end
702
+ #
703
+ def delete_app_connector request, options = nil
704
+ raise ::ArgumentError, "request must be provided" if request.nil?
705
+
706
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::DeleteAppConnectorRequest
707
+
708
+ # Converts hash and nil to an options object
709
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
710
+
711
+ # Customize the options with defaults
712
+ metadata = @config.rpcs.delete_app_connector.metadata.to_h
713
+
714
+ # Set x-goog-api-client and x-goog-user-project headers
715
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
716
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
717
+ gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION
718
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
719
+
720
+ header_params = {}
721
+ if request.name
722
+ header_params["name"] = request.name
723
+ end
724
+
725
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
726
+ metadata[:"x-goog-request-params"] ||= request_params_header
727
+
728
+ options.apply_defaults timeout: @config.rpcs.delete_app_connector.timeout,
729
+ metadata: metadata,
730
+ retry_policy: @config.rpcs.delete_app_connector.retry_policy
731
+
732
+ options.apply_defaults timeout: @config.timeout,
733
+ metadata: @config.metadata,
734
+ retry_policy: @config.retry_policy
735
+
736
+ @app_connectors_service_stub.call_rpc :delete_app_connector, request, options: options do |response, operation|
737
+ response = ::Gapic::Operation.new response, @operations_client, options: options
738
+ yield response, operation if block_given?
739
+ return response
740
+ end
741
+ rescue ::GRPC::BadStatus => e
742
+ raise ::Google::Cloud::Error.from_error(e)
743
+ end
744
+
745
+ ##
746
+ # Report status for a given connector.
747
+ #
748
+ # @overload report_status(request, options = nil)
749
+ # Pass arguments to `report_status` via a request object, either of type
750
+ # {::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest} or an equivalent Hash.
751
+ #
752
+ # @param request [::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest, ::Hash]
753
+ # A request object representing the call parameters. Required. To specify no
754
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
755
+ # @param options [::Gapic::CallOptions, ::Hash]
756
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
757
+ #
758
+ # @overload report_status(app_connector: nil, resource_info: nil, request_id: nil, validate_only: nil)
759
+ # Pass arguments to `report_status` via keyword arguments. Note that at
760
+ # least one keyword argument is required. To specify no parameters, or to keep all
761
+ # the default parameter values, pass an empty Hash as a request object (see above).
762
+ #
763
+ # @param app_connector [::String]
764
+ # Required. BeyondCorp Connector name using the form:
765
+ # `projects/{project_id}/locations/{location_id}/connectors/{connector}`
766
+ # @param resource_info [::Google::Cloud::BeyondCorp::AppConnectors::V1::ResourceInfo, ::Hash]
767
+ # Required. Resource info of the connector.
768
+ # @param request_id [::String]
769
+ # Optional. An optional request ID to identify requests. Specify a unique
770
+ # request ID so that if you must retry your request, the server will know to
771
+ # ignore the request if it has already been completed. The server will
772
+ # guarantee that for at least 60 minutes since the first request.
773
+ #
774
+ # For example, consider a situation where you make an initial request and t
775
+ # he request times out. If you make the request again with the same request
776
+ # ID, the server can check if original operation with the same request ID
777
+ # was received, and if so, will ignore the second request. This prevents
778
+ # clients from accidentally creating duplicate commitments.
779
+ #
780
+ # The request ID must be a valid UUID with the exception that zero UUID is
781
+ # not supported (00000000-0000-0000-0000-000000000000).
782
+ # @param validate_only [::Boolean]
783
+ # Optional. If set, validates request by executing a dry-run which would not
784
+ # alter the resource in any way.
785
+ #
786
+ # @yield [response, operation] Access the result along with the RPC operation
787
+ # @yieldparam response [::Gapic::Operation]
788
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
789
+ #
790
+ # @return [::Gapic::Operation]
791
+ #
792
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
793
+ #
794
+ # @example Basic example
795
+ # require "google/cloud/beyond_corp/app_connectors/v1"
796
+ #
797
+ # # Create a client object. The client can be reused for multiple calls.
798
+ # client = Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new
799
+ #
800
+ # # Create a request. To set request fields, pass in keyword arguments.
801
+ # request = Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest.new
802
+ #
803
+ # # Call the report_status method.
804
+ # result = client.report_status request
805
+ #
806
+ # # The returned object is of type Gapic::Operation. You can use this
807
+ # # object to check the status of an operation, cancel it, or wait
808
+ # # for results. Here is how to block until completion:
809
+ # result.wait_until_done! timeout: 60
810
+ # if result.response?
811
+ # p result.response
812
+ # else
813
+ # puts "Error!"
814
+ # end
815
+ #
816
+ def report_status request, options = nil
817
+ raise ::ArgumentError, "request must be provided" if request.nil?
818
+
819
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::BeyondCorp::AppConnectors::V1::ReportStatusRequest
820
+
821
+ # Converts hash and nil to an options object
822
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
823
+
824
+ # Customize the options with defaults
825
+ metadata = @config.rpcs.report_status.metadata.to_h
826
+
827
+ # Set x-goog-api-client and x-goog-user-project headers
828
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
829
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
830
+ gapic_version: ::Google::Cloud::BeyondCorp::AppConnectors::V1::VERSION
831
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
832
+
833
+ header_params = {}
834
+ if request.app_connector
835
+ header_params["app_connector"] = request.app_connector
836
+ end
837
+
838
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
839
+ metadata[:"x-goog-request-params"] ||= request_params_header
840
+
841
+ options.apply_defaults timeout: @config.rpcs.report_status.timeout,
842
+ metadata: metadata,
843
+ retry_policy: @config.rpcs.report_status.retry_policy
844
+
845
+ options.apply_defaults timeout: @config.timeout,
846
+ metadata: @config.metadata,
847
+ retry_policy: @config.retry_policy
848
+
849
+ @app_connectors_service_stub.call_rpc :report_status, request, options: options do |response, operation|
850
+ response = ::Gapic::Operation.new response, @operations_client, options: options
851
+ yield response, operation if block_given?
852
+ return response
853
+ end
854
+ rescue ::GRPC::BadStatus => e
855
+ raise ::Google::Cloud::Error.from_error(e)
856
+ end
857
+
858
+ ##
859
+ # Configuration class for the AppConnectorsService API.
860
+ #
861
+ # This class represents the configuration for AppConnectorsService,
862
+ # providing control over timeouts, retry behavior, logging, transport
863
+ # parameters, and other low-level controls. Certain parameters can also be
864
+ # applied individually to specific RPCs. See
865
+ # {::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client::Configuration::Rpcs}
866
+ # for a list of RPCs that can be configured independently.
867
+ #
868
+ # Configuration can be applied globally to all clients, or to a single client
869
+ # on construction.
870
+ #
871
+ # @example
872
+ #
873
+ # # Modify the global config, setting the timeout for
874
+ # # list_app_connectors to 20 seconds,
875
+ # # and all remaining timeouts to 10 seconds.
876
+ # ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.configure do |config|
877
+ # config.timeout = 10.0
878
+ # config.rpcs.list_app_connectors.timeout = 20.0
879
+ # end
880
+ #
881
+ # # Apply the above configuration only to a new client.
882
+ # client = ::Google::Cloud::BeyondCorp::AppConnectors::V1::AppConnectorsService::Client.new do |config|
883
+ # config.timeout = 10.0
884
+ # config.rpcs.list_app_connectors.timeout = 20.0
885
+ # end
886
+ #
887
+ # @!attribute [rw] endpoint
888
+ # The hostname or hostname:port of the service endpoint.
889
+ # Defaults to `"beyondcorp.googleapis.com"`.
890
+ # @return [::String]
891
+ # @!attribute [rw] credentials
892
+ # Credentials to send with calls. You may provide any of the following types:
893
+ # * (`String`) The path to a service account key file in JSON format
894
+ # * (`Hash`) A service account key as a Hash
895
+ # * (`Google::Auth::Credentials`) A googleauth credentials object
896
+ # (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
897
+ # * (`Signet::OAuth2::Client`) A signet oauth2 client object
898
+ # (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
899
+ # * (`GRPC::Core::Channel`) a gRPC channel with included credentials
900
+ # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
901
+ # * (`nil`) indicating no credentials
902
+ # @return [::Object]
903
+ # @!attribute [rw] scope
904
+ # The OAuth scopes
905
+ # @return [::Array<::String>]
906
+ # @!attribute [rw] lib_name
907
+ # The library name as recorded in instrumentation and logging
908
+ # @return [::String]
909
+ # @!attribute [rw] lib_version
910
+ # The library version as recorded in instrumentation and logging
911
+ # @return [::String]
912
+ # @!attribute [rw] channel_args
913
+ # Extra parameters passed to the gRPC channel. Note: this is ignored if a
914
+ # `GRPC::Core::Channel` object is provided as the credential.
915
+ # @return [::Hash]
916
+ # @!attribute [rw] interceptors
917
+ # An array of interceptors that are run before calls are executed.
918
+ # @return [::Array<::GRPC::ClientInterceptor>]
919
+ # @!attribute [rw] timeout
920
+ # The call timeout in seconds.
921
+ # @return [::Numeric]
922
+ # @!attribute [rw] metadata
923
+ # Additional gRPC headers to be sent with the call.
924
+ # @return [::Hash{::Symbol=>::String}]
925
+ # @!attribute [rw] retry_policy
926
+ # The retry policy. The value is a hash with the following keys:
927
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
928
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
929
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
930
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
931
+ # trigger a retry.
932
+ # @return [::Hash]
933
+ # @!attribute [rw] quota_project
934
+ # A separate project against which to charge quota.
935
+ # @return [::String]
936
+ #
937
+ class Configuration
938
+ extend ::Gapic::Config
939
+
940
+ config_attr :endpoint, "beyondcorp.googleapis.com", ::String
941
+ config_attr :credentials, nil do |value|
942
+ allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
943
+ allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
944
+ allowed.any? { |klass| klass === value }
945
+ end
946
+ config_attr :scope, nil, ::String, ::Array, nil
947
+ config_attr :lib_name, nil, ::String, nil
948
+ config_attr :lib_version, nil, ::String, nil
949
+ config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
950
+ config_attr :interceptors, nil, ::Array, nil
951
+ config_attr :timeout, nil, ::Numeric, nil
952
+ config_attr :metadata, nil, ::Hash, nil
953
+ config_attr :retry_policy, nil, ::Hash, ::Proc, nil
954
+ config_attr :quota_project, nil, ::String, nil
955
+
956
+ # @private
957
+ def initialize parent_config = nil
958
+ @parent_config = parent_config unless parent_config.nil?
959
+
960
+ yield self if block_given?
961
+ end
962
+
963
+ ##
964
+ # Configurations for individual RPCs
965
+ # @return [Rpcs]
966
+ #
967
+ def rpcs
968
+ @rpcs ||= begin
969
+ parent_rpcs = nil
970
+ parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
971
+ Rpcs.new parent_rpcs
972
+ end
973
+ end
974
+
975
+ ##
976
+ # Configuration RPC class for the AppConnectorsService API.
977
+ #
978
+ # Includes fields providing the configuration for each RPC in this service.
979
+ # Each configuration object is of type `Gapic::Config::Method` and includes
980
+ # the following configuration fields:
981
+ #
982
+ # * `timeout` (*type:* `Numeric`) - The call timeout in seconds
983
+ # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
984
+ # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
985
+ # include the following keys:
986
+ # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
987
+ # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
988
+ # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
989
+ # * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
990
+ # trigger a retry.
991
+ #
992
+ class Rpcs
993
+ ##
994
+ # RPC-specific configuration for `list_app_connectors`
995
+ # @return [::Gapic::Config::Method]
996
+ #
997
+ attr_reader :list_app_connectors
998
+ ##
999
+ # RPC-specific configuration for `get_app_connector`
1000
+ # @return [::Gapic::Config::Method]
1001
+ #
1002
+ attr_reader :get_app_connector
1003
+ ##
1004
+ # RPC-specific configuration for `create_app_connector`
1005
+ # @return [::Gapic::Config::Method]
1006
+ #
1007
+ attr_reader :create_app_connector
1008
+ ##
1009
+ # RPC-specific configuration for `update_app_connector`
1010
+ # @return [::Gapic::Config::Method]
1011
+ #
1012
+ attr_reader :update_app_connector
1013
+ ##
1014
+ # RPC-specific configuration for `delete_app_connector`
1015
+ # @return [::Gapic::Config::Method]
1016
+ #
1017
+ attr_reader :delete_app_connector
1018
+ ##
1019
+ # RPC-specific configuration for `report_status`
1020
+ # @return [::Gapic::Config::Method]
1021
+ #
1022
+ attr_reader :report_status
1023
+
1024
+ # @private
1025
+ def initialize parent_rpcs = nil
1026
+ list_app_connectors_config = parent_rpcs.list_app_connectors if parent_rpcs.respond_to? :list_app_connectors
1027
+ @list_app_connectors = ::Gapic::Config::Method.new list_app_connectors_config
1028
+ get_app_connector_config = parent_rpcs.get_app_connector if parent_rpcs.respond_to? :get_app_connector
1029
+ @get_app_connector = ::Gapic::Config::Method.new get_app_connector_config
1030
+ create_app_connector_config = parent_rpcs.create_app_connector if parent_rpcs.respond_to? :create_app_connector
1031
+ @create_app_connector = ::Gapic::Config::Method.new create_app_connector_config
1032
+ update_app_connector_config = parent_rpcs.update_app_connector if parent_rpcs.respond_to? :update_app_connector
1033
+ @update_app_connector = ::Gapic::Config::Method.new update_app_connector_config
1034
+ delete_app_connector_config = parent_rpcs.delete_app_connector if parent_rpcs.respond_to? :delete_app_connector
1035
+ @delete_app_connector = ::Gapic::Config::Method.new delete_app_connector_config
1036
+ report_status_config = parent_rpcs.report_status if parent_rpcs.respond_to? :report_status
1037
+ @report_status = ::Gapic::Config::Method.new report_status_config
1038
+
1039
+ yield self if block_given?
1040
+ end
1041
+ end
1042
+ end
1043
+ end
1044
+ end
1045
+ end
1046
+ end
1047
+ end
1048
+ end
1049
+ end