google-cloud-data_fusion-v1 0.1.0 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f58f6885a5c60c33bb7e5fae31e872a9a2f5b2d631240e462212753acb339661
4
- data.tar.gz: 8f01540590c6fd80fca7b77c39163155b050d0f9d323da5f8bef60d745c08f76
3
+ metadata.gz: 6b39e3729168eb47590a09681cb2cebcbb0a6cf1632ad65b2c0850348cbcd810
4
+ data.tar.gz: 5baad0357cd449c69145c9640b062f8f5b0aae994d40bbd17a314f9dd13eb49b
5
5
  SHA512:
6
- metadata.gz: 2f4b37c60c8099a602e8085d230de1d437c35db0aa7e0776098b1b47575bcb94490ce1a74d80d9ebe626468e7d56406b29c1afdfece94ee164c8e55d03cfd043
7
- data.tar.gz: a86aa09c4cf4eb91eec6c7ccf5636e7027db2224d9df5a8b3018431301f212dc16f9c431eea3821d54eabbdf21a621eb878771bdd51c954458df068508a7501c
6
+ metadata.gz: f6dad801c74307ac4fb305191d75674ce067cc0b17655cc891921a1cc2d2d95940db2e0457cabba258e00460bf5047a8fa59527e7e777e3cc811ad6ed7b347ef
7
+ data.tar.gz: 353e4d7e4246d76a69bbc1d73e86cd694952613e9b428959d9a455c4efbbd08c94d0555122a100f940da5ec81aa5a2e2d7147150626e6ffc710cc85136c7e7b1
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Cloud Data Fusion V1 API
2
+ --title="Cloud Data Fusion V1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -118,15 +118,6 @@ To configure your system for this, simply:
118
118
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
119
119
  *should* only be used during development.
120
120
 
121
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
122
- [dev-console]: https://console.cloud.google.com/project
123
-
124
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
125
-
126
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
127
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
128
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
129
-
130
121
  ## Creating a Service Account
131
122
 
132
123
  Google Cloud requires **Service Account Credentials** to
@@ -137,31 +128,22 @@ If you are not running this client within
137
128
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
138
129
  need a Google Developers service account.
139
130
 
140
- 1. Visit the [Google Developers Console][dev-console].
131
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
141
132
  2. Create a new project or click on an existing project.
142
- 3. Activate the slide-out navigation tray and select **API Manager**. From
133
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
143
134
  here, you will enable the APIs that your application requires.
144
135
 
145
- ![Enable the APIs that your application requires][enable-apis]
146
-
147
136
  *Note: You may need to enable billing in order to use these services.*
148
137
 
149
138
  4. Select **Credentials** from the side navigation.
150
139
 
151
- You should see a screen like one of the following.
152
-
153
- ![Create a new service account][create-new-service-account]
154
-
155
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
156
-
157
- Find the "Add credentials" drop down and select "Service account" to be
158
- guided through downloading a new JSON key file.
140
+ Find the "Create credentials" drop down near the top of the page, and select
141
+ "Service account" to be guided through downloading a new JSON key file.
159
142
 
160
143
  If you want to re-use an existing service account, you can easily generate a
161
- new key file. Just select the account you wish to re-use, and click "Generate
162
- new JSON key":
163
-
164
- ![Re-use an existing service account][reuse-service-account]
144
+ new key file. Just select the account you wish to re-use, click the pencil
145
+ tool on the right side to edit the service account, select the **Keys** tab,
146
+ and then select **Add Key**.
165
147
 
166
148
  The key file you download will be used by this library to authenticate API
167
149
  requests and should be stored in a secure location.
@@ -43,13 +43,12 @@ module Google
43
43
  # See {::Google::Cloud::DataFusion::V1::DataFusion::Client::Configuration}
44
44
  # for a description of the configuration fields.
45
45
  #
46
- # ## Example
46
+ # @example
47
47
  #
48
- # To modify the configuration for all DataFusion clients:
49
- #
50
- # ::Google::Cloud::DataFusion::V1::DataFusion::Client.configure do |config|
51
- # config.timeout = 10.0
52
- # end
48
+ # # Modify the configuration for all DataFusion clients
49
+ # ::Google::Cloud::DataFusion::V1::DataFusion::Client.configure do |config|
50
+ # config.timeout = 10.0
51
+ # end
53
52
  #
54
53
  # @yield [config] Configure the Client client.
55
54
  # @yieldparam config [Client::Configuration]
@@ -98,19 +97,15 @@ module Google
98
97
  ##
99
98
  # Create a new DataFusion client object.
100
99
  #
101
- # ## Examples
102
- #
103
- # To create a new DataFusion client with the default
104
- # configuration:
100
+ # @example
105
101
  #
106
- # client = ::Google::Cloud::DataFusion::V1::DataFusion::Client.new
102
+ # # Create a client using the default configuration
103
+ # client = ::Google::Cloud::DataFusion::V1::DataFusion::Client.new
107
104
  #
108
- # To create a new DataFusion client with a custom
109
- # configuration:
110
- #
111
- # client = ::Google::Cloud::DataFusion::V1::DataFusion::Client.new do |config|
112
- # config.timeout = 10.0
113
- # end
105
+ # # Create a client using a custom configuration
106
+ # client = ::Google::Cloud::DataFusion::V1::DataFusion::Client.new do |config|
107
+ # config.timeout = 10.0
108
+ # end
114
109
  #
115
110
  # @yield [config] Configure the DataFusion client.
116
111
  # @yieldparam config [Client::Configuration]
@@ -130,10 +125,9 @@ module Google
130
125
 
131
126
  # Create credentials
132
127
  credentials = @config.credentials
133
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
128
+ # Use self-signed JWT if the endpoint is unchanged from default,
134
129
  # but only if the default endpoint does not have a region prefix.
135
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
136
- @config.endpoint == Client.configure.endpoint &&
130
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
137
131
  !@config.endpoint.split(".").first.include?("-")
138
132
  credentials ||= Credentials.default scope: @config.scope,
139
133
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -145,6 +139,7 @@ module Google
145
139
 
146
140
  @operations_client = Operations.new do |config|
147
141
  config.credentials = credentials
142
+ config.quota_project = @quota_project_id
148
143
  config.endpoint = @config.endpoint
149
144
  end
150
145
 
@@ -186,8 +181,8 @@ module Google
186
181
  # the default parameter values, pass an empty Hash as a request object (see above).
187
182
  #
188
183
  # @param parent [::String]
189
- # Required. The project and location for which to retrieve instance
190
- # information in the format projects/\\{project}/locations/\\{location}.
184
+ # Required. The project and location for which to retrieve instance information
185
+ # in the format projects/\\{project}/locations/\\{location}.
191
186
  # @param page_size [::Integer]
192
187
  # The maximum number of items to return.
193
188
  # @param page_token [::String]
@@ -206,6 +201,27 @@ module Google
206
201
  #
207
202
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
208
203
  #
204
+ # @example Basic example
205
+ # require "google/cloud/data_fusion/v1"
206
+ #
207
+ # # Create a client object. The client can be reused for multiple calls.
208
+ # client = Google::Cloud::DataFusion::V1::DataFusion::Client.new
209
+ #
210
+ # # Create a request. To set request fields, pass in keyword arguments.
211
+ # request = Google::Cloud::DataFusion::V1::ListAvailableVersionsRequest.new
212
+ #
213
+ # # Call the list_available_versions method.
214
+ # result = client.list_available_versions request
215
+ #
216
+ # # The returned object is of type Gapic::PagedEnumerable. You can
217
+ # # iterate over all elements by calling #each, and the enumerable
218
+ # # will lazily make API calls to fetch subsequent pages. Other
219
+ # # methods are also available for managing paging directly.
220
+ # result.each do |response|
221
+ # # Each element is of type ::Google::Cloud::DataFusion::V1::Version.
222
+ # p response
223
+ # end
224
+ #
209
225
  def list_available_versions request, options = nil
210
226
  raise ::ArgumentError, "request must be provided" if request.nil?
211
227
 
@@ -223,16 +239,20 @@ module Google
223
239
  gapic_version: ::Google::Cloud::DataFusion::V1::VERSION
224
240
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
225
241
 
226
- header_params = {
227
- "parent" => request.parent
228
- }
242
+ header_params = {}
243
+ if request.parent
244
+ header_params["parent"] = request.parent
245
+ end
246
+
229
247
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
230
248
  metadata[:"x-goog-request-params"] ||= request_params_header
231
249
 
232
250
  options.apply_defaults timeout: @config.rpcs.list_available_versions.timeout,
233
251
  metadata: metadata,
234
252
  retry_policy: @config.rpcs.list_available_versions.retry_policy
235
- options.apply_defaults metadata: @config.metadata,
253
+
254
+ options.apply_defaults timeout: @config.timeout,
255
+ metadata: @config.metadata,
236
256
  retry_policy: @config.retry_policy
237
257
 
238
258
  @data_fusion_stub.call_rpc :list_available_versions, request, options: options do |response, operation|
@@ -263,7 +283,7 @@ module Google
263
283
  # the default parameter values, pass an empty Hash as a request object (see above).
264
284
  #
265
285
  # @param parent [::String]
266
- # The project and location for which to retrieve instance information
286
+ # Required. The project and location for which to retrieve instance information
267
287
  # in the format projects/\\{project}/locations/\\{location}. If the location is
268
288
  # specified as '-' (wildcard), then all regions available to the project
269
289
  # are queried, and the results are aggregated.
@@ -285,6 +305,27 @@ module Google
285
305
  #
286
306
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
287
307
  #
308
+ # @example Basic example
309
+ # require "google/cloud/data_fusion/v1"
310
+ #
311
+ # # Create a client object. The client can be reused for multiple calls.
312
+ # client = Google::Cloud::DataFusion::V1::DataFusion::Client.new
313
+ #
314
+ # # Create a request. To set request fields, pass in keyword arguments.
315
+ # request = Google::Cloud::DataFusion::V1::ListInstancesRequest.new
316
+ #
317
+ # # Call the list_instances method.
318
+ # result = client.list_instances request
319
+ #
320
+ # # The returned object is of type Gapic::PagedEnumerable. You can
321
+ # # iterate over all elements by calling #each, and the enumerable
322
+ # # will lazily make API calls to fetch subsequent pages. Other
323
+ # # methods are also available for managing paging directly.
324
+ # result.each do |response|
325
+ # # Each element is of type ::Google::Cloud::DataFusion::V1::Instance.
326
+ # p response
327
+ # end
328
+ #
288
329
  def list_instances request, options = nil
289
330
  raise ::ArgumentError, "request must be provided" if request.nil?
290
331
 
@@ -302,16 +343,20 @@ module Google
302
343
  gapic_version: ::Google::Cloud::DataFusion::V1::VERSION
303
344
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
304
345
 
305
- header_params = {
306
- "parent" => request.parent
307
- }
346
+ header_params = {}
347
+ if request.parent
348
+ header_params["parent"] = request.parent
349
+ end
350
+
308
351
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
309
352
  metadata[:"x-goog-request-params"] ||= request_params_header
310
353
 
311
354
  options.apply_defaults timeout: @config.rpcs.list_instances.timeout,
312
355
  metadata: metadata,
313
356
  retry_policy: @config.rpcs.list_instances.retry_policy
314
- options.apply_defaults metadata: @config.metadata,
357
+
358
+ options.apply_defaults timeout: @config.timeout,
359
+ metadata: @config.metadata,
315
360
  retry_policy: @config.retry_policy
316
361
 
317
362
  @data_fusion_stub.call_rpc :list_instances, request, options: options do |response, operation|
@@ -342,7 +387,7 @@ module Google
342
387
  # the default parameter values, pass an empty Hash as a request object (see above).
343
388
  #
344
389
  # @param name [::String]
345
- # The instance resource name in the format
390
+ # Required. The instance resource name in the format
346
391
  # projects/\\{project}/locations/\\{location}/instances/\\{instance}.
347
392
  #
348
393
  # @yield [response, operation] Access the result along with the RPC operation
@@ -353,6 +398,21 @@ module Google
353
398
  #
354
399
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
355
400
  #
401
+ # @example Basic example
402
+ # require "google/cloud/data_fusion/v1"
403
+ #
404
+ # # Create a client object. The client can be reused for multiple calls.
405
+ # client = Google::Cloud::DataFusion::V1::DataFusion::Client.new
406
+ #
407
+ # # Create a request. To set request fields, pass in keyword arguments.
408
+ # request = Google::Cloud::DataFusion::V1::GetInstanceRequest.new
409
+ #
410
+ # # Call the get_instance method.
411
+ # result = client.get_instance request
412
+ #
413
+ # # The returned object is of type Google::Cloud::DataFusion::V1::Instance.
414
+ # p result
415
+ #
356
416
  def get_instance request, options = nil
357
417
  raise ::ArgumentError, "request must be provided" if request.nil?
358
418
 
@@ -370,16 +430,20 @@ module Google
370
430
  gapic_version: ::Google::Cloud::DataFusion::V1::VERSION
371
431
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
372
432
 
373
- header_params = {
374
- "name" => request.name
375
- }
433
+ header_params = {}
434
+ if request.name
435
+ header_params["name"] = request.name
436
+ end
437
+
376
438
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
377
439
  metadata[:"x-goog-request-params"] ||= request_params_header
378
440
 
379
441
  options.apply_defaults timeout: @config.rpcs.get_instance.timeout,
380
442
  metadata: metadata,
381
443
  retry_policy: @config.rpcs.get_instance.retry_policy
382
- options.apply_defaults metadata: @config.metadata,
444
+
445
+ options.apply_defaults timeout: @config.timeout,
446
+ metadata: @config.metadata,
383
447
  retry_policy: @config.retry_policy
384
448
 
385
449
  @data_fusion_stub.call_rpc :get_instance, request, options: options do |response, operation|
@@ -409,10 +473,10 @@ module Google
409
473
  # the default parameter values, pass an empty Hash as a request object (see above).
410
474
  #
411
475
  # @param parent [::String]
412
- # The instance's project and location in the format
476
+ # Required. The instance's project and location in the format
413
477
  # projects/\\{project}/locations/\\{location}.
414
478
  # @param instance_id [::String]
415
- # The name of the instance to create.
479
+ # Required. The name of the instance to create.
416
480
  # @param instance [::Google::Cloud::DataFusion::V1::Instance, ::Hash]
417
481
  # An instance resource.
418
482
  #
@@ -424,6 +488,28 @@ module Google
424
488
  #
425
489
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
426
490
  #
491
+ # @example Basic example
492
+ # require "google/cloud/data_fusion/v1"
493
+ #
494
+ # # Create a client object. The client can be reused for multiple calls.
495
+ # client = Google::Cloud::DataFusion::V1::DataFusion::Client.new
496
+ #
497
+ # # Create a request. To set request fields, pass in keyword arguments.
498
+ # request = Google::Cloud::DataFusion::V1::CreateInstanceRequest.new
499
+ #
500
+ # # Call the create_instance method.
501
+ # result = client.create_instance request
502
+ #
503
+ # # The returned object is of type Gapic::Operation. You can use this
504
+ # # object to check the status of an operation, cancel it, or wait
505
+ # # for results. Here is how to block until completion:
506
+ # result.wait_until_done! timeout: 60
507
+ # if result.response?
508
+ # p result.response
509
+ # else
510
+ # puts "Error!"
511
+ # end
512
+ #
427
513
  def create_instance request, options = nil
428
514
  raise ::ArgumentError, "request must be provided" if request.nil?
429
515
 
@@ -441,16 +527,20 @@ module Google
441
527
  gapic_version: ::Google::Cloud::DataFusion::V1::VERSION
442
528
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
443
529
 
444
- header_params = {
445
- "parent" => request.parent
446
- }
530
+ header_params = {}
531
+ if request.parent
532
+ header_params["parent"] = request.parent
533
+ end
534
+
447
535
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
448
536
  metadata[:"x-goog-request-params"] ||= request_params_header
449
537
 
450
538
  options.apply_defaults timeout: @config.rpcs.create_instance.timeout,
451
539
  metadata: metadata,
452
540
  retry_policy: @config.rpcs.create_instance.retry_policy
453
- options.apply_defaults metadata: @config.metadata,
541
+
542
+ options.apply_defaults timeout: @config.timeout,
543
+ metadata: @config.metadata,
454
544
  retry_policy: @config.retry_policy
455
545
 
456
546
  @data_fusion_stub.call_rpc :create_instance, request, options: options do |response, operation|
@@ -481,7 +571,7 @@ module Google
481
571
  # the default parameter values, pass an empty Hash as a request object (see above).
482
572
  #
483
573
  # @param name [::String]
484
- # The instance resource name in the format
574
+ # Required. The instance resource name in the format
485
575
  # projects/\\{project}/locations/\\{location}/instances/\\{instance}
486
576
  #
487
577
  # @yield [response, operation] Access the result along with the RPC operation
@@ -492,6 +582,28 @@ module Google
492
582
  #
493
583
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
494
584
  #
585
+ # @example Basic example
586
+ # require "google/cloud/data_fusion/v1"
587
+ #
588
+ # # Create a client object. The client can be reused for multiple calls.
589
+ # client = Google::Cloud::DataFusion::V1::DataFusion::Client.new
590
+ #
591
+ # # Create a request. To set request fields, pass in keyword arguments.
592
+ # request = Google::Cloud::DataFusion::V1::DeleteInstanceRequest.new
593
+ #
594
+ # # Call the delete_instance method.
595
+ # result = client.delete_instance request
596
+ #
597
+ # # The returned object is of type Gapic::Operation. You can use this
598
+ # # object to check the status of an operation, cancel it, or wait
599
+ # # for results. Here is how to block until completion:
600
+ # result.wait_until_done! timeout: 60
601
+ # if result.response?
602
+ # p result.response
603
+ # else
604
+ # puts "Error!"
605
+ # end
606
+ #
495
607
  def delete_instance request, options = nil
496
608
  raise ::ArgumentError, "request must be provided" if request.nil?
497
609
 
@@ -509,16 +621,20 @@ module Google
509
621
  gapic_version: ::Google::Cloud::DataFusion::V1::VERSION
510
622
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
511
623
 
512
- header_params = {
513
- "name" => request.name
514
- }
624
+ header_params = {}
625
+ if request.name
626
+ header_params["name"] = request.name
627
+ end
628
+
515
629
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
516
630
  metadata[:"x-goog-request-params"] ||= request_params_header
517
631
 
518
632
  options.apply_defaults timeout: @config.rpcs.delete_instance.timeout,
519
633
  metadata: metadata,
520
634
  retry_policy: @config.rpcs.delete_instance.retry_policy
521
- options.apply_defaults metadata: @config.metadata,
635
+
636
+ options.apply_defaults timeout: @config.timeout,
637
+ metadata: @config.metadata,
522
638
  retry_policy: @config.retry_policy
523
639
 
524
640
  @data_fusion_stub.call_rpc :delete_instance, request, options: options do |response, operation|
@@ -549,7 +665,7 @@ module Google
549
665
  # the default parameter values, pass an empty Hash as a request object (see above).
550
666
  #
551
667
  # @param instance [::Google::Cloud::DataFusion::V1::Instance, ::Hash]
552
- # The instance resource that replaces the resource on the server. Currently,
668
+ # Required. The instance resource that replaces the resource on the server. Currently,
553
669
  # Data Fusion only allows replacing labels, options, and stack driver
554
670
  # settings. All other fields will be ignored.
555
671
  # @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
@@ -568,6 +684,28 @@ module Google
568
684
  #
569
685
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
570
686
  #
687
+ # @example Basic example
688
+ # require "google/cloud/data_fusion/v1"
689
+ #
690
+ # # Create a client object. The client can be reused for multiple calls.
691
+ # client = Google::Cloud::DataFusion::V1::DataFusion::Client.new
692
+ #
693
+ # # Create a request. To set request fields, pass in keyword arguments.
694
+ # request = Google::Cloud::DataFusion::V1::UpdateInstanceRequest.new
695
+ #
696
+ # # Call the update_instance method.
697
+ # result = client.update_instance request
698
+ #
699
+ # # The returned object is of type Gapic::Operation. You can use this
700
+ # # object to check the status of an operation, cancel it, or wait
701
+ # # for results. Here is how to block until completion:
702
+ # result.wait_until_done! timeout: 60
703
+ # if result.response?
704
+ # p result.response
705
+ # else
706
+ # puts "Error!"
707
+ # end
708
+ #
571
709
  def update_instance request, options = nil
572
710
  raise ::ArgumentError, "request must be provided" if request.nil?
573
711
 
@@ -585,16 +723,20 @@ module Google
585
723
  gapic_version: ::Google::Cloud::DataFusion::V1::VERSION
586
724
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
587
725
 
588
- header_params = {
589
- "instance.name" => request.instance.name
590
- }
726
+ header_params = {}
727
+ if request.instance&.name
728
+ header_params["instance.name"] = request.instance.name
729
+ end
730
+
591
731
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
592
732
  metadata[:"x-goog-request-params"] ||= request_params_header
593
733
 
594
734
  options.apply_defaults timeout: @config.rpcs.update_instance.timeout,
595
735
  metadata: metadata,
596
736
  retry_policy: @config.rpcs.update_instance.retry_policy
597
- options.apply_defaults metadata: @config.metadata,
737
+
738
+ options.apply_defaults timeout: @config.timeout,
739
+ metadata: @config.metadata,
598
740
  retry_policy: @config.retry_policy
599
741
 
600
742
  @data_fusion_stub.call_rpc :update_instance, request, options: options do |response, operation|
@@ -626,7 +768,7 @@ module Google
626
768
  # the default parameter values, pass an empty Hash as a request object (see above).
627
769
  #
628
770
  # @param name [::String]
629
- # Name of the Data Fusion instance which need to be restarted in the form of
771
+ # Required. Name of the Data Fusion instance which need to be restarted in the form of
630
772
  # projects/\\{project}/locations/\\{location}/instances/\\{instance}
631
773
  #
632
774
  # @yield [response, operation] Access the result along with the RPC operation
@@ -637,6 +779,28 @@ module Google
637
779
  #
638
780
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
639
781
  #
782
+ # @example Basic example
783
+ # require "google/cloud/data_fusion/v1"
784
+ #
785
+ # # Create a client object. The client can be reused for multiple calls.
786
+ # client = Google::Cloud::DataFusion::V1::DataFusion::Client.new
787
+ #
788
+ # # Create a request. To set request fields, pass in keyword arguments.
789
+ # request = Google::Cloud::DataFusion::V1::RestartInstanceRequest.new
790
+ #
791
+ # # Call the restart_instance method.
792
+ # result = client.restart_instance request
793
+ #
794
+ # # The returned object is of type Gapic::Operation. You can use this
795
+ # # object to check the status of an operation, cancel it, or wait
796
+ # # for results. Here is how to block until completion:
797
+ # result.wait_until_done! timeout: 60
798
+ # if result.response?
799
+ # p result.response
800
+ # else
801
+ # puts "Error!"
802
+ # end
803
+ #
640
804
  def restart_instance request, options = nil
641
805
  raise ::ArgumentError, "request must be provided" if request.nil?
642
806
 
@@ -654,16 +818,20 @@ module Google
654
818
  gapic_version: ::Google::Cloud::DataFusion::V1::VERSION
655
819
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
656
820
 
657
- header_params = {
658
- "name" => request.name
659
- }
821
+ header_params = {}
822
+ if request.name
823
+ header_params["name"] = request.name
824
+ end
825
+
660
826
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
661
827
  metadata[:"x-goog-request-params"] ||= request_params_header
662
828
 
663
829
  options.apply_defaults timeout: @config.rpcs.restart_instance.timeout,
664
830
  metadata: metadata,
665
831
  retry_policy: @config.rpcs.restart_instance.retry_policy
666
- options.apply_defaults metadata: @config.metadata,
832
+
833
+ options.apply_defaults timeout: @config.timeout,
834
+ metadata: @config.metadata,
667
835
  retry_policy: @config.retry_policy
668
836
 
669
837
  @data_fusion_stub.call_rpc :restart_instance, request, options: options do |response, operation|
@@ -688,22 +856,21 @@ module Google
688
856
  # Configuration can be applied globally to all clients, or to a single client
689
857
  # on construction.
690
858
  #
691
- # # Examples
692
- #
693
- # To modify the global config, setting the timeout for list_available_versions
694
- # to 20 seconds, and all remaining timeouts to 10 seconds:
695
- #
696
- # ::Google::Cloud::DataFusion::V1::DataFusion::Client.configure do |config|
697
- # config.timeout = 10.0
698
- # config.rpcs.list_available_versions.timeout = 20.0
699
- # end
700
- #
701
- # To apply the above configuration only to a new client:
702
- #
703
- # client = ::Google::Cloud::DataFusion::V1::DataFusion::Client.new do |config|
704
- # config.timeout = 10.0
705
- # config.rpcs.list_available_versions.timeout = 20.0
706
- # end
859
+ # @example
860
+ #
861
+ # # Modify the global config, setting the timeout for
862
+ # # list_available_versions to 20 seconds,
863
+ # # and all remaining timeouts to 10 seconds.
864
+ # ::Google::Cloud::DataFusion::V1::DataFusion::Client.configure do |config|
865
+ # config.timeout = 10.0
866
+ # config.rpcs.list_available_versions.timeout = 20.0
867
+ # end
868
+ #
869
+ # # Apply the above configuration only to a new client.
870
+ # client = ::Google::Cloud::DataFusion::V1::DataFusion::Client.new do |config|
871
+ # config.timeout = 10.0
872
+ # config.rpcs.list_available_versions.timeout = 20.0
873
+ # end
707
874
  #
708
875
  # @!attribute [rw] endpoint
709
876
  # The hostname or hostname:port of the service endpoint.