google-cloud-network_connectivity-v1 0.1.0

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