google-cloud-notebooks-v1beta1 0.4.1 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -41,13 +41,12 @@ module Google
41
41
  # See {::Google::Cloud::Notebooks::V1beta1::NotebookService::Client::Configuration}
42
42
  # for a description of the configuration fields.
43
43
  #
44
- # ## Example
44
+ # @example
45
45
  #
46
- # To modify the configuration for all NotebookService clients:
47
- #
48
- # ::Google::Cloud::Notebooks::V1beta1::NotebookService::Client.configure do |config|
49
- # config.timeout = 10.0
50
- # end
46
+ # # Modify the configuration for all NotebookService clients
47
+ # ::Google::Cloud::Notebooks::V1beta1::NotebookService::Client.configure do |config|
48
+ # config.timeout = 10.0
49
+ # end
51
50
  #
52
51
  # @yield [config] Configure the Client client.
53
52
  # @yieldparam config [Client::Configuration]
@@ -67,10 +66,7 @@ module Google
67
66
 
68
67
  default_config.timeout = 60.0
69
68
  default_config.retry_policy = {
70
- initial_delay: 0.1,
71
- max_delay: 60.0,
72
- multiplier: 1.3,
73
- retry_codes: [14]
69
+ initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14]
74
70
  }
75
71
 
76
72
  default_config.rpcs.list_instances.timeout = 60.0
@@ -140,19 +136,15 @@ module Google
140
136
  ##
141
137
  # Create a new NotebookService client object.
142
138
  #
143
- # ## Examples
144
- #
145
- # To create a new NotebookService client with the default
146
- # configuration:
147
- #
148
- # client = ::Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
139
+ # @example
149
140
  #
150
- # To create a new NotebookService client with a custom
151
- # configuration:
141
+ # # Create a client using the default configuration
142
+ # client = ::Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
152
143
  #
153
- # client = ::Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new do |config|
154
- # config.timeout = 10.0
155
- # end
144
+ # # Create a client using a custom configuration
145
+ # client = ::Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new do |config|
146
+ # config.timeout = 10.0
147
+ # end
156
148
  #
157
149
  # @yield [config] Configure the NotebookService client.
158
150
  # @yieldparam config [Client::Configuration]
@@ -172,14 +164,13 @@ module Google
172
164
 
173
165
  # Create credentials
174
166
  credentials = @config.credentials
175
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
167
+ # Use self-signed JWT if the endpoint is unchanged from default,
176
168
  # but only if the default endpoint does not have a region prefix.
177
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
178
- @config.endpoint == Client.configure.endpoint &&
169
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
179
170
  !@config.endpoint.split(".").first.include?("-")
180
171
  credentials ||= Credentials.default scope: @config.scope,
181
172
  enable_self_signed_jwt: enable_self_signed_jwt
182
- if credentials.is_a?(String) || credentials.is_a?(Hash)
173
+ if credentials.is_a?(::String) || credentials.is_a?(::Hash)
183
174
  credentials = Credentials.new credentials, scope: @config.scope
184
175
  end
185
176
  @quota_project_id = @config.quota_project
@@ -187,6 +178,7 @@ module Google
187
178
 
188
179
  @operations_client = Operations.new do |config|
189
180
  config.credentials = credentials
181
+ config.quota_project = @quota_project_id
190
182
  config.endpoint = @config.endpoint
191
183
  end
192
184
 
@@ -243,6 +235,27 @@ module Google
243
235
  #
244
236
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
245
237
  #
238
+ # @example Basic example
239
+ # require "google/cloud/notebooks/v1beta1"
240
+ #
241
+ # # Create a client object. The client can be reused for multiple calls.
242
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
243
+ #
244
+ # # Create a request. To set request fields, pass in keyword arguments.
245
+ # request = Google::Cloud::Notebooks::V1beta1::ListInstancesRequest.new
246
+ #
247
+ # # Call the list_instances method.
248
+ # result = client.list_instances request
249
+ #
250
+ # # The returned object is of type Gapic::PagedEnumerable. You can
251
+ # # iterate over all elements by calling #each, and the enumerable
252
+ # # will lazily make API calls to fetch subsequent pages. Other
253
+ # # methods are also available for managing paging directly.
254
+ # result.each do |response|
255
+ # # Each element is of type ::Google::Cloud::Notebooks::V1beta1::Instance.
256
+ # p response
257
+ # end
258
+ #
246
259
  def list_instances request, options = nil
247
260
  raise ::ArgumentError, "request must be provided" if request.nil?
248
261
 
@@ -260,16 +273,20 @@ module Google
260
273
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
261
274
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
262
275
 
263
- header_params = {
264
- "parent" => request.parent
265
- }
276
+ header_params = {}
277
+ if request.parent
278
+ header_params["parent"] = request.parent
279
+ end
280
+
266
281
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
267
282
  metadata[:"x-goog-request-params"] ||= request_params_header
268
283
 
269
284
  options.apply_defaults timeout: @config.rpcs.list_instances.timeout,
270
285
  metadata: metadata,
271
286
  retry_policy: @config.rpcs.list_instances.retry_policy
272
- options.apply_defaults metadata: @config.metadata,
287
+
288
+ options.apply_defaults timeout: @config.timeout,
289
+ metadata: @config.metadata,
273
290
  retry_policy: @config.retry_policy
274
291
 
275
292
  @notebook_service_stub.call_rpc :list_instances, request, options: options do |response, operation|
@@ -311,6 +328,21 @@ module Google
311
328
  #
312
329
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
313
330
  #
331
+ # @example Basic example
332
+ # require "google/cloud/notebooks/v1beta1"
333
+ #
334
+ # # Create a client object. The client can be reused for multiple calls.
335
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
336
+ #
337
+ # # Create a request. To set request fields, pass in keyword arguments.
338
+ # request = Google::Cloud::Notebooks::V1beta1::GetInstanceRequest.new
339
+ #
340
+ # # Call the get_instance method.
341
+ # result = client.get_instance request
342
+ #
343
+ # # The returned object is of type Google::Cloud::Notebooks::V1beta1::Instance.
344
+ # p result
345
+ #
314
346
  def get_instance request, options = nil
315
347
  raise ::ArgumentError, "request must be provided" if request.nil?
316
348
 
@@ -328,16 +360,20 @@ module Google
328
360
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
329
361
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
330
362
 
331
- header_params = {
332
- "name" => request.name
333
- }
363
+ header_params = {}
364
+ if request.name
365
+ header_params["name"] = request.name
366
+ end
367
+
334
368
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
335
369
  metadata[:"x-goog-request-params"] ||= request_params_header
336
370
 
337
371
  options.apply_defaults timeout: @config.rpcs.get_instance.timeout,
338
372
  metadata: metadata,
339
373
  retry_policy: @config.rpcs.get_instance.retry_policy
340
- options.apply_defaults metadata: @config.metadata,
374
+
375
+ options.apply_defaults timeout: @config.timeout,
376
+ metadata: @config.metadata,
341
377
  retry_policy: @config.retry_policy
342
378
 
343
379
  @notebook_service_stub.call_rpc :get_instance, request, options: options do |response, operation|
@@ -382,6 +418,28 @@ module Google
382
418
  #
383
419
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
384
420
  #
421
+ # @example Basic example
422
+ # require "google/cloud/notebooks/v1beta1"
423
+ #
424
+ # # Create a client object. The client can be reused for multiple calls.
425
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
426
+ #
427
+ # # Create a request. To set request fields, pass in keyword arguments.
428
+ # request = Google::Cloud::Notebooks::V1beta1::CreateInstanceRequest.new
429
+ #
430
+ # # Call the create_instance method.
431
+ # result = client.create_instance request
432
+ #
433
+ # # The returned object is of type Gapic::Operation. You can use this
434
+ # # object to check the status of an operation, cancel it, or wait
435
+ # # for results. Here is how to block until completion:
436
+ # result.wait_until_done! timeout: 60
437
+ # if result.response?
438
+ # p result.response
439
+ # else
440
+ # puts "Error!"
441
+ # end
442
+ #
385
443
  def create_instance request, options = nil
386
444
  raise ::ArgumentError, "request must be provided" if request.nil?
387
445
 
@@ -399,16 +457,20 @@ module Google
399
457
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
400
458
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
401
459
 
402
- header_params = {
403
- "parent" => request.parent
404
- }
460
+ header_params = {}
461
+ if request.parent
462
+ header_params["parent"] = request.parent
463
+ end
464
+
405
465
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
406
466
  metadata[:"x-goog-request-params"] ||= request_params_header
407
467
 
408
468
  options.apply_defaults timeout: @config.rpcs.create_instance.timeout,
409
469
  metadata: metadata,
410
470
  retry_policy: @config.rpcs.create_instance.retry_policy
411
- options.apply_defaults metadata: @config.metadata,
471
+
472
+ options.apply_defaults timeout: @config.timeout,
473
+ metadata: @config.metadata,
412
474
  retry_policy: @config.retry_policy
413
475
 
414
476
  @notebook_service_stub.call_rpc :create_instance, request, options: options do |response, operation|
@@ -458,6 +520,28 @@ module Google
458
520
  #
459
521
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
460
522
  #
523
+ # @example Basic example
524
+ # require "google/cloud/notebooks/v1beta1"
525
+ #
526
+ # # Create a client object. The client can be reused for multiple calls.
527
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
528
+ #
529
+ # # Create a request. To set request fields, pass in keyword arguments.
530
+ # request = Google::Cloud::Notebooks::V1beta1::RegisterInstanceRequest.new
531
+ #
532
+ # # Call the register_instance method.
533
+ # result = client.register_instance request
534
+ #
535
+ # # The returned object is of type Gapic::Operation. You can use this
536
+ # # object to check the status of an operation, cancel it, or wait
537
+ # # for results. Here is how to block until completion:
538
+ # result.wait_until_done! timeout: 60
539
+ # if result.response?
540
+ # p result.response
541
+ # else
542
+ # puts "Error!"
543
+ # end
544
+ #
461
545
  def register_instance request, options = nil
462
546
  raise ::ArgumentError, "request must be provided" if request.nil?
463
547
 
@@ -475,16 +559,20 @@ module Google
475
559
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
476
560
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
477
561
 
478
- header_params = {
479
- "parent" => request.parent
480
- }
562
+ header_params = {}
563
+ if request.parent
564
+ header_params["parent"] = request.parent
565
+ end
566
+
481
567
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
482
568
  metadata[:"x-goog-request-params"] ||= request_params_header
483
569
 
484
570
  options.apply_defaults timeout: @config.rpcs.register_instance.timeout,
485
571
  metadata: metadata,
486
572
  retry_policy: @config.rpcs.register_instance.retry_policy
487
- options.apply_defaults metadata: @config.metadata,
573
+
574
+ options.apply_defaults timeout: @config.timeout,
575
+ metadata: @config.metadata,
488
576
  retry_policy: @config.retry_policy
489
577
 
490
578
  @notebook_service_stub.call_rpc :register_instance, request, options: options do |response, operation|
@@ -533,6 +621,28 @@ module Google
533
621
  #
534
622
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
535
623
  #
624
+ # @example Basic example
625
+ # require "google/cloud/notebooks/v1beta1"
626
+ #
627
+ # # Create a client object. The client can be reused for multiple calls.
628
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
629
+ #
630
+ # # Create a request. To set request fields, pass in keyword arguments.
631
+ # request = Google::Cloud::Notebooks::V1beta1::SetInstanceAcceleratorRequest.new
632
+ #
633
+ # # Call the set_instance_accelerator method.
634
+ # result = client.set_instance_accelerator request
635
+ #
636
+ # # The returned object is of type Gapic::Operation. You can use this
637
+ # # object to check the status of an operation, cancel it, or wait
638
+ # # for results. Here is how to block until completion:
639
+ # result.wait_until_done! timeout: 60
640
+ # if result.response?
641
+ # p result.response
642
+ # else
643
+ # puts "Error!"
644
+ # end
645
+ #
536
646
  def set_instance_accelerator request, options = nil
537
647
  raise ::ArgumentError, "request must be provided" if request.nil?
538
648
 
@@ -550,16 +660,20 @@ module Google
550
660
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
551
661
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
552
662
 
553
- header_params = {
554
- "name" => request.name
555
- }
663
+ header_params = {}
664
+ if request.name
665
+ header_params["name"] = request.name
666
+ end
667
+
556
668
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
557
669
  metadata[:"x-goog-request-params"] ||= request_params_header
558
670
 
559
671
  options.apply_defaults timeout: @config.rpcs.set_instance_accelerator.timeout,
560
672
  metadata: metadata,
561
673
  retry_policy: @config.rpcs.set_instance_accelerator.retry_policy
562
- options.apply_defaults metadata: @config.metadata,
674
+
675
+ options.apply_defaults timeout: @config.timeout,
676
+ metadata: @config.metadata,
563
677
  retry_policy: @config.retry_policy
564
678
 
565
679
  @notebook_service_stub.call_rpc :set_instance_accelerator, request, options: options do |response, operation|
@@ -604,6 +718,28 @@ module Google
604
718
  #
605
719
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
606
720
  #
721
+ # @example Basic example
722
+ # require "google/cloud/notebooks/v1beta1"
723
+ #
724
+ # # Create a client object. The client can be reused for multiple calls.
725
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
726
+ #
727
+ # # Create a request. To set request fields, pass in keyword arguments.
728
+ # request = Google::Cloud::Notebooks::V1beta1::SetInstanceMachineTypeRequest.new
729
+ #
730
+ # # Call the set_instance_machine_type method.
731
+ # result = client.set_instance_machine_type request
732
+ #
733
+ # # The returned object is of type Gapic::Operation. You can use this
734
+ # # object to check the status of an operation, cancel it, or wait
735
+ # # for results. Here is how to block until completion:
736
+ # result.wait_until_done! timeout: 60
737
+ # if result.response?
738
+ # p result.response
739
+ # else
740
+ # puts "Error!"
741
+ # end
742
+ #
607
743
  def set_instance_machine_type request, options = nil
608
744
  raise ::ArgumentError, "request must be provided" if request.nil?
609
745
 
@@ -621,16 +757,20 @@ module Google
621
757
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
622
758
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
623
759
 
624
- header_params = {
625
- "name" => request.name
626
- }
760
+ header_params = {}
761
+ if request.name
762
+ header_params["name"] = request.name
763
+ end
764
+
627
765
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
628
766
  metadata[:"x-goog-request-params"] ||= request_params_header
629
767
 
630
768
  options.apply_defaults timeout: @config.rpcs.set_instance_machine_type.timeout,
631
769
  metadata: metadata,
632
770
  retry_policy: @config.rpcs.set_instance_machine_type.retry_policy
633
- options.apply_defaults metadata: @config.metadata,
771
+
772
+ options.apply_defaults timeout: @config.timeout,
773
+ metadata: @config.metadata,
634
774
  retry_policy: @config.retry_policy
635
775
 
636
776
  @notebook_service_stub.call_rpc :set_instance_machine_type, request, options: options do |response, operation|
@@ -675,6 +815,28 @@ module Google
675
815
  #
676
816
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
677
817
  #
818
+ # @example Basic example
819
+ # require "google/cloud/notebooks/v1beta1"
820
+ #
821
+ # # Create a client object. The client can be reused for multiple calls.
822
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
823
+ #
824
+ # # Create a request. To set request fields, pass in keyword arguments.
825
+ # request = Google::Cloud::Notebooks::V1beta1::SetInstanceLabelsRequest.new
826
+ #
827
+ # # Call the set_instance_labels method.
828
+ # result = client.set_instance_labels request
829
+ #
830
+ # # The returned object is of type Gapic::Operation. You can use this
831
+ # # object to check the status of an operation, cancel it, or wait
832
+ # # for results. Here is how to block until completion:
833
+ # result.wait_until_done! timeout: 60
834
+ # if result.response?
835
+ # p result.response
836
+ # else
837
+ # puts "Error!"
838
+ # end
839
+ #
678
840
  def set_instance_labels request, options = nil
679
841
  raise ::ArgumentError, "request must be provided" if request.nil?
680
842
 
@@ -692,16 +854,20 @@ module Google
692
854
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
693
855
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
694
856
 
695
- header_params = {
696
- "name" => request.name
697
- }
857
+ header_params = {}
858
+ if request.name
859
+ header_params["name"] = request.name
860
+ end
861
+
698
862
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
699
863
  metadata[:"x-goog-request-params"] ||= request_params_header
700
864
 
701
865
  options.apply_defaults timeout: @config.rpcs.set_instance_labels.timeout,
702
866
  metadata: metadata,
703
867
  retry_policy: @config.rpcs.set_instance_labels.retry_policy
704
- options.apply_defaults metadata: @config.metadata,
868
+
869
+ options.apply_defaults timeout: @config.timeout,
870
+ metadata: @config.metadata,
705
871
  retry_policy: @config.retry_policy
706
872
 
707
873
  @notebook_service_stub.call_rpc :set_instance_labels, request, options: options do |response, operation|
@@ -743,6 +909,28 @@ module Google
743
909
  #
744
910
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
745
911
  #
912
+ # @example Basic example
913
+ # require "google/cloud/notebooks/v1beta1"
914
+ #
915
+ # # Create a client object. The client can be reused for multiple calls.
916
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
917
+ #
918
+ # # Create a request. To set request fields, pass in keyword arguments.
919
+ # request = Google::Cloud::Notebooks::V1beta1::DeleteInstanceRequest.new
920
+ #
921
+ # # Call the delete_instance method.
922
+ # result = client.delete_instance request
923
+ #
924
+ # # The returned object is of type Gapic::Operation. You can use this
925
+ # # object to check the status of an operation, cancel it, or wait
926
+ # # for results. Here is how to block until completion:
927
+ # result.wait_until_done! timeout: 60
928
+ # if result.response?
929
+ # p result.response
930
+ # else
931
+ # puts "Error!"
932
+ # end
933
+ #
746
934
  def delete_instance request, options = nil
747
935
  raise ::ArgumentError, "request must be provided" if request.nil?
748
936
 
@@ -760,16 +948,20 @@ module Google
760
948
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
761
949
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
762
950
 
763
- header_params = {
764
- "name" => request.name
765
- }
951
+ header_params = {}
952
+ if request.name
953
+ header_params["name"] = request.name
954
+ end
955
+
766
956
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
767
957
  metadata[:"x-goog-request-params"] ||= request_params_header
768
958
 
769
959
  options.apply_defaults timeout: @config.rpcs.delete_instance.timeout,
770
960
  metadata: metadata,
771
961
  retry_policy: @config.rpcs.delete_instance.retry_policy
772
- options.apply_defaults metadata: @config.metadata,
962
+
963
+ options.apply_defaults timeout: @config.timeout,
964
+ metadata: @config.metadata,
773
965
  retry_policy: @config.retry_policy
774
966
 
775
967
  @notebook_service_stub.call_rpc :delete_instance, request, options: options do |response, operation|
@@ -811,6 +1003,28 @@ module Google
811
1003
  #
812
1004
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
813
1005
  #
1006
+ # @example Basic example
1007
+ # require "google/cloud/notebooks/v1beta1"
1008
+ #
1009
+ # # Create a client object. The client can be reused for multiple calls.
1010
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
1011
+ #
1012
+ # # Create a request. To set request fields, pass in keyword arguments.
1013
+ # request = Google::Cloud::Notebooks::V1beta1::StartInstanceRequest.new
1014
+ #
1015
+ # # Call the start_instance method.
1016
+ # result = client.start_instance request
1017
+ #
1018
+ # # The returned object is of type Gapic::Operation. You can use this
1019
+ # # object to check the status of an operation, cancel it, or wait
1020
+ # # for results. Here is how to block until completion:
1021
+ # result.wait_until_done! timeout: 60
1022
+ # if result.response?
1023
+ # p result.response
1024
+ # else
1025
+ # puts "Error!"
1026
+ # end
1027
+ #
814
1028
  def start_instance request, options = nil
815
1029
  raise ::ArgumentError, "request must be provided" if request.nil?
816
1030
 
@@ -828,16 +1042,20 @@ module Google
828
1042
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
829
1043
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
830
1044
 
831
- header_params = {
832
- "name" => request.name
833
- }
1045
+ header_params = {}
1046
+ if request.name
1047
+ header_params["name"] = request.name
1048
+ end
1049
+
834
1050
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
835
1051
  metadata[:"x-goog-request-params"] ||= request_params_header
836
1052
 
837
1053
  options.apply_defaults timeout: @config.rpcs.start_instance.timeout,
838
1054
  metadata: metadata,
839
1055
  retry_policy: @config.rpcs.start_instance.retry_policy
840
- options.apply_defaults metadata: @config.metadata,
1056
+
1057
+ options.apply_defaults timeout: @config.timeout,
1058
+ metadata: @config.metadata,
841
1059
  retry_policy: @config.retry_policy
842
1060
 
843
1061
  @notebook_service_stub.call_rpc :start_instance, request, options: options do |response, operation|
@@ -879,6 +1097,28 @@ module Google
879
1097
  #
880
1098
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
881
1099
  #
1100
+ # @example Basic example
1101
+ # require "google/cloud/notebooks/v1beta1"
1102
+ #
1103
+ # # Create a client object. The client can be reused for multiple calls.
1104
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
1105
+ #
1106
+ # # Create a request. To set request fields, pass in keyword arguments.
1107
+ # request = Google::Cloud::Notebooks::V1beta1::StopInstanceRequest.new
1108
+ #
1109
+ # # Call the stop_instance method.
1110
+ # result = client.stop_instance request
1111
+ #
1112
+ # # The returned object is of type Gapic::Operation. You can use this
1113
+ # # object to check the status of an operation, cancel it, or wait
1114
+ # # for results. Here is how to block until completion:
1115
+ # result.wait_until_done! timeout: 60
1116
+ # if result.response?
1117
+ # p result.response
1118
+ # else
1119
+ # puts "Error!"
1120
+ # end
1121
+ #
882
1122
  def stop_instance request, options = nil
883
1123
  raise ::ArgumentError, "request must be provided" if request.nil?
884
1124
 
@@ -896,16 +1136,20 @@ module Google
896
1136
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
897
1137
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
898
1138
 
899
- header_params = {
900
- "name" => request.name
901
- }
1139
+ header_params = {}
1140
+ if request.name
1141
+ header_params["name"] = request.name
1142
+ end
1143
+
902
1144
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
903
1145
  metadata[:"x-goog-request-params"] ||= request_params_header
904
1146
 
905
1147
  options.apply_defaults timeout: @config.rpcs.stop_instance.timeout,
906
1148
  metadata: metadata,
907
1149
  retry_policy: @config.rpcs.stop_instance.retry_policy
908
- options.apply_defaults metadata: @config.metadata,
1150
+
1151
+ options.apply_defaults timeout: @config.timeout,
1152
+ metadata: @config.metadata,
909
1153
  retry_policy: @config.retry_policy
910
1154
 
911
1155
  @notebook_service_stub.call_rpc :stop_instance, request, options: options do |response, operation|
@@ -947,6 +1191,28 @@ module Google
947
1191
  #
948
1192
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
949
1193
  #
1194
+ # @example Basic example
1195
+ # require "google/cloud/notebooks/v1beta1"
1196
+ #
1197
+ # # Create a client object. The client can be reused for multiple calls.
1198
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
1199
+ #
1200
+ # # Create a request. To set request fields, pass in keyword arguments.
1201
+ # request = Google::Cloud::Notebooks::V1beta1::ResetInstanceRequest.new
1202
+ #
1203
+ # # Call the reset_instance method.
1204
+ # result = client.reset_instance request
1205
+ #
1206
+ # # The returned object is of type Gapic::Operation. You can use this
1207
+ # # object to check the status of an operation, cancel it, or wait
1208
+ # # for results. Here is how to block until completion:
1209
+ # result.wait_until_done! timeout: 60
1210
+ # if result.response?
1211
+ # p result.response
1212
+ # else
1213
+ # puts "Error!"
1214
+ # end
1215
+ #
950
1216
  def reset_instance request, options = nil
951
1217
  raise ::ArgumentError, "request must be provided" if request.nil?
952
1218
 
@@ -964,16 +1230,20 @@ module Google
964
1230
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
965
1231
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
966
1232
 
967
- header_params = {
968
- "name" => request.name
969
- }
1233
+ header_params = {}
1234
+ if request.name
1235
+ header_params["name"] = request.name
1236
+ end
1237
+
970
1238
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
971
1239
  metadata[:"x-goog-request-params"] ||= request_params_header
972
1240
 
973
1241
  options.apply_defaults timeout: @config.rpcs.reset_instance.timeout,
974
1242
  metadata: metadata,
975
1243
  retry_policy: @config.rpcs.reset_instance.retry_policy
976
- options.apply_defaults metadata: @config.metadata,
1244
+
1245
+ options.apply_defaults timeout: @config.timeout,
1246
+ metadata: @config.metadata,
977
1247
  retry_policy: @config.retry_policy
978
1248
 
979
1249
  @notebook_service_stub.call_rpc :reset_instance, request, options: options do |response, operation|
@@ -1024,6 +1294,28 @@ module Google
1024
1294
  #
1025
1295
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1026
1296
  #
1297
+ # @example Basic example
1298
+ # require "google/cloud/notebooks/v1beta1"
1299
+ #
1300
+ # # Create a client object. The client can be reused for multiple calls.
1301
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
1302
+ #
1303
+ # # Create a request. To set request fields, pass in keyword arguments.
1304
+ # request = Google::Cloud::Notebooks::V1beta1::ReportInstanceInfoRequest.new
1305
+ #
1306
+ # # Call the report_instance_info method.
1307
+ # result = client.report_instance_info request
1308
+ #
1309
+ # # The returned object is of type Gapic::Operation. You can use this
1310
+ # # object to check the status of an operation, cancel it, or wait
1311
+ # # for results. Here is how to block until completion:
1312
+ # result.wait_until_done! timeout: 60
1313
+ # if result.response?
1314
+ # p result.response
1315
+ # else
1316
+ # puts "Error!"
1317
+ # end
1318
+ #
1027
1319
  def report_instance_info request, options = nil
1028
1320
  raise ::ArgumentError, "request must be provided" if request.nil?
1029
1321
 
@@ -1041,16 +1333,20 @@ module Google
1041
1333
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
1042
1334
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1043
1335
 
1044
- header_params = {
1045
- "name" => request.name
1046
- }
1336
+ header_params = {}
1337
+ if request.name
1338
+ header_params["name"] = request.name
1339
+ end
1340
+
1047
1341
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1048
1342
  metadata[:"x-goog-request-params"] ||= request_params_header
1049
1343
 
1050
1344
  options.apply_defaults timeout: @config.rpcs.report_instance_info.timeout,
1051
1345
  metadata: metadata,
1052
1346
  retry_policy: @config.rpcs.report_instance_info.retry_policy
1053
- options.apply_defaults metadata: @config.metadata,
1347
+
1348
+ options.apply_defaults timeout: @config.timeout,
1349
+ metadata: @config.metadata,
1054
1350
  retry_policy: @config.retry_policy
1055
1351
 
1056
1352
  @notebook_service_stub.call_rpc :report_instance_info, request, options: options do |response, operation|
@@ -1092,6 +1388,21 @@ module Google
1092
1388
  #
1093
1389
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1094
1390
  #
1391
+ # @example Basic example
1392
+ # require "google/cloud/notebooks/v1beta1"
1393
+ #
1394
+ # # Create a client object. The client can be reused for multiple calls.
1395
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
1396
+ #
1397
+ # # Create a request. To set request fields, pass in keyword arguments.
1398
+ # request = Google::Cloud::Notebooks::V1beta1::IsInstanceUpgradeableRequest.new
1399
+ #
1400
+ # # Call the is_instance_upgradeable method.
1401
+ # result = client.is_instance_upgradeable request
1402
+ #
1403
+ # # The returned object is of type Google::Cloud::Notebooks::V1beta1::IsInstanceUpgradeableResponse.
1404
+ # p result
1405
+ #
1095
1406
  def is_instance_upgradeable request, options = nil
1096
1407
  raise ::ArgumentError, "request must be provided" if request.nil?
1097
1408
 
@@ -1109,16 +1420,20 @@ module Google
1109
1420
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
1110
1421
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1111
1422
 
1112
- header_params = {
1113
- "notebook_instance" => request.notebook_instance
1114
- }
1423
+ header_params = {}
1424
+ if request.notebook_instance
1425
+ header_params["notebook_instance"] = request.notebook_instance
1426
+ end
1427
+
1115
1428
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1116
1429
  metadata[:"x-goog-request-params"] ||= request_params_header
1117
1430
 
1118
1431
  options.apply_defaults timeout: @config.rpcs.is_instance_upgradeable.timeout,
1119
1432
  metadata: metadata,
1120
1433
  retry_policy: @config.rpcs.is_instance_upgradeable.retry_policy
1121
- options.apply_defaults metadata: @config.metadata,
1434
+
1435
+ options.apply_defaults timeout: @config.timeout,
1436
+ metadata: @config.metadata,
1122
1437
  retry_policy: @config.retry_policy
1123
1438
 
1124
1439
  @notebook_service_stub.call_rpc :is_instance_upgradeable, request, options: options do |response, operation|
@@ -1159,6 +1474,28 @@ module Google
1159
1474
  #
1160
1475
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1161
1476
  #
1477
+ # @example Basic example
1478
+ # require "google/cloud/notebooks/v1beta1"
1479
+ #
1480
+ # # Create a client object. The client can be reused for multiple calls.
1481
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
1482
+ #
1483
+ # # Create a request. To set request fields, pass in keyword arguments.
1484
+ # request = Google::Cloud::Notebooks::V1beta1::UpgradeInstanceRequest.new
1485
+ #
1486
+ # # Call the upgrade_instance method.
1487
+ # result = client.upgrade_instance request
1488
+ #
1489
+ # # The returned object is of type Gapic::Operation. You can use this
1490
+ # # object to check the status of an operation, cancel it, or wait
1491
+ # # for results. Here is how to block until completion:
1492
+ # result.wait_until_done! timeout: 60
1493
+ # if result.response?
1494
+ # p result.response
1495
+ # else
1496
+ # puts "Error!"
1497
+ # end
1498
+ #
1162
1499
  def upgrade_instance request, options = nil
1163
1500
  raise ::ArgumentError, "request must be provided" if request.nil?
1164
1501
 
@@ -1176,16 +1513,20 @@ module Google
1176
1513
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
1177
1514
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1178
1515
 
1179
- header_params = {
1180
- "name" => request.name
1181
- }
1516
+ header_params = {}
1517
+ if request.name
1518
+ header_params["name"] = request.name
1519
+ end
1520
+
1182
1521
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1183
1522
  metadata[:"x-goog-request-params"] ||= request_params_header
1184
1523
 
1185
1524
  options.apply_defaults timeout: @config.rpcs.upgrade_instance.timeout,
1186
1525
  metadata: metadata,
1187
1526
  retry_policy: @config.rpcs.upgrade_instance.retry_policy
1188
- options.apply_defaults metadata: @config.metadata,
1527
+
1528
+ options.apply_defaults timeout: @config.timeout,
1529
+ metadata: @config.metadata,
1189
1530
  retry_policy: @config.retry_policy
1190
1531
 
1191
1532
  @notebook_service_stub.call_rpc :upgrade_instance, request, options: options do |response, operation|
@@ -1231,6 +1572,28 @@ module Google
1231
1572
  #
1232
1573
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1233
1574
  #
1575
+ # @example Basic example
1576
+ # require "google/cloud/notebooks/v1beta1"
1577
+ #
1578
+ # # Create a client object. The client can be reused for multiple calls.
1579
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
1580
+ #
1581
+ # # Create a request. To set request fields, pass in keyword arguments.
1582
+ # request = Google::Cloud::Notebooks::V1beta1::UpgradeInstanceInternalRequest.new
1583
+ #
1584
+ # # Call the upgrade_instance_internal method.
1585
+ # result = client.upgrade_instance_internal request
1586
+ #
1587
+ # # The returned object is of type Gapic::Operation. You can use this
1588
+ # # object to check the status of an operation, cancel it, or wait
1589
+ # # for results. Here is how to block until completion:
1590
+ # result.wait_until_done! timeout: 60
1591
+ # if result.response?
1592
+ # p result.response
1593
+ # else
1594
+ # puts "Error!"
1595
+ # end
1596
+ #
1234
1597
  def upgrade_instance_internal request, options = nil
1235
1598
  raise ::ArgumentError, "request must be provided" if request.nil?
1236
1599
 
@@ -1248,16 +1611,20 @@ module Google
1248
1611
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
1249
1612
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1250
1613
 
1251
- header_params = {
1252
- "name" => request.name
1253
- }
1614
+ header_params = {}
1615
+ if request.name
1616
+ header_params["name"] = request.name
1617
+ end
1618
+
1254
1619
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1255
1620
  metadata[:"x-goog-request-params"] ||= request_params_header
1256
1621
 
1257
1622
  options.apply_defaults timeout: @config.rpcs.upgrade_instance_internal.timeout,
1258
1623
  metadata: metadata,
1259
1624
  retry_policy: @config.rpcs.upgrade_instance_internal.retry_policy
1260
- options.apply_defaults metadata: @config.metadata,
1625
+
1626
+ options.apply_defaults timeout: @config.timeout,
1627
+ metadata: @config.metadata,
1261
1628
  retry_policy: @config.retry_policy
1262
1629
 
1263
1630
  @notebook_service_stub.call_rpc :upgrade_instance_internal, request, options: options do |response, operation|
@@ -1303,6 +1670,27 @@ module Google
1303
1670
  #
1304
1671
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1305
1672
  #
1673
+ # @example Basic example
1674
+ # require "google/cloud/notebooks/v1beta1"
1675
+ #
1676
+ # # Create a client object. The client can be reused for multiple calls.
1677
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
1678
+ #
1679
+ # # Create a request. To set request fields, pass in keyword arguments.
1680
+ # request = Google::Cloud::Notebooks::V1beta1::ListEnvironmentsRequest.new
1681
+ #
1682
+ # # Call the list_environments method.
1683
+ # result = client.list_environments request
1684
+ #
1685
+ # # The returned object is of type Gapic::PagedEnumerable. You can
1686
+ # # iterate over all elements by calling #each, and the enumerable
1687
+ # # will lazily make API calls to fetch subsequent pages. Other
1688
+ # # methods are also available for managing paging directly.
1689
+ # result.each do |response|
1690
+ # # Each element is of type ::Google::Cloud::Notebooks::V1beta1::Environment.
1691
+ # p response
1692
+ # end
1693
+ #
1306
1694
  def list_environments request, options = nil
1307
1695
  raise ::ArgumentError, "request must be provided" if request.nil?
1308
1696
 
@@ -1320,16 +1708,20 @@ module Google
1320
1708
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
1321
1709
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1322
1710
 
1323
- header_params = {
1324
- "parent" => request.parent
1325
- }
1711
+ header_params = {}
1712
+ if request.parent
1713
+ header_params["parent"] = request.parent
1714
+ end
1715
+
1326
1716
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1327
1717
  metadata[:"x-goog-request-params"] ||= request_params_header
1328
1718
 
1329
1719
  options.apply_defaults timeout: @config.rpcs.list_environments.timeout,
1330
1720
  metadata: metadata,
1331
1721
  retry_policy: @config.rpcs.list_environments.retry_policy
1332
- options.apply_defaults metadata: @config.metadata,
1722
+
1723
+ options.apply_defaults timeout: @config.timeout,
1724
+ metadata: @config.metadata,
1333
1725
  retry_policy: @config.retry_policy
1334
1726
 
1335
1727
  @notebook_service_stub.call_rpc :list_environments, request, options: options do |response, operation|
@@ -1371,6 +1763,21 @@ module Google
1371
1763
  #
1372
1764
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1373
1765
  #
1766
+ # @example Basic example
1767
+ # require "google/cloud/notebooks/v1beta1"
1768
+ #
1769
+ # # Create a client object. The client can be reused for multiple calls.
1770
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
1771
+ #
1772
+ # # Create a request. To set request fields, pass in keyword arguments.
1773
+ # request = Google::Cloud::Notebooks::V1beta1::GetEnvironmentRequest.new
1774
+ #
1775
+ # # Call the get_environment method.
1776
+ # result = client.get_environment request
1777
+ #
1778
+ # # The returned object is of type Google::Cloud::Notebooks::V1beta1::Environment.
1779
+ # p result
1780
+ #
1374
1781
  def get_environment request, options = nil
1375
1782
  raise ::ArgumentError, "request must be provided" if request.nil?
1376
1783
 
@@ -1388,16 +1795,20 @@ module Google
1388
1795
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
1389
1796
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1390
1797
 
1391
- header_params = {
1392
- "name" => request.name
1393
- }
1798
+ header_params = {}
1799
+ if request.name
1800
+ header_params["name"] = request.name
1801
+ end
1802
+
1394
1803
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1395
1804
  metadata[:"x-goog-request-params"] ||= request_params_header
1396
1805
 
1397
1806
  options.apply_defaults timeout: @config.rpcs.get_environment.timeout,
1398
1807
  metadata: metadata,
1399
1808
  retry_policy: @config.rpcs.get_environment.retry_policy
1400
- options.apply_defaults metadata: @config.metadata,
1809
+
1810
+ options.apply_defaults timeout: @config.timeout,
1811
+ metadata: @config.metadata,
1401
1812
  retry_policy: @config.retry_policy
1402
1813
 
1403
1814
  @notebook_service_stub.call_rpc :get_environment, request, options: options do |response, operation|
@@ -1444,6 +1855,28 @@ module Google
1444
1855
  #
1445
1856
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1446
1857
  #
1858
+ # @example Basic example
1859
+ # require "google/cloud/notebooks/v1beta1"
1860
+ #
1861
+ # # Create a client object. The client can be reused for multiple calls.
1862
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
1863
+ #
1864
+ # # Create a request. To set request fields, pass in keyword arguments.
1865
+ # request = Google::Cloud::Notebooks::V1beta1::CreateEnvironmentRequest.new
1866
+ #
1867
+ # # Call the create_environment method.
1868
+ # result = client.create_environment request
1869
+ #
1870
+ # # The returned object is of type Gapic::Operation. You can use this
1871
+ # # object to check the status of an operation, cancel it, or wait
1872
+ # # for results. Here is how to block until completion:
1873
+ # result.wait_until_done! timeout: 60
1874
+ # if result.response?
1875
+ # p result.response
1876
+ # else
1877
+ # puts "Error!"
1878
+ # end
1879
+ #
1447
1880
  def create_environment request, options = nil
1448
1881
  raise ::ArgumentError, "request must be provided" if request.nil?
1449
1882
 
@@ -1461,16 +1894,20 @@ module Google
1461
1894
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
1462
1895
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1463
1896
 
1464
- header_params = {
1465
- "parent" => request.parent
1466
- }
1897
+ header_params = {}
1898
+ if request.parent
1899
+ header_params["parent"] = request.parent
1900
+ end
1901
+
1467
1902
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1468
1903
  metadata[:"x-goog-request-params"] ||= request_params_header
1469
1904
 
1470
1905
  options.apply_defaults timeout: @config.rpcs.create_environment.timeout,
1471
1906
  metadata: metadata,
1472
1907
  retry_policy: @config.rpcs.create_environment.retry_policy
1473
- options.apply_defaults metadata: @config.metadata,
1908
+
1909
+ options.apply_defaults timeout: @config.timeout,
1910
+ metadata: @config.metadata,
1474
1911
  retry_policy: @config.retry_policy
1475
1912
 
1476
1913
  @notebook_service_stub.call_rpc :create_environment, request, options: options do |response, operation|
@@ -1512,6 +1949,28 @@ module Google
1512
1949
  #
1513
1950
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1514
1951
  #
1952
+ # @example Basic example
1953
+ # require "google/cloud/notebooks/v1beta1"
1954
+ #
1955
+ # # Create a client object. The client can be reused for multiple calls.
1956
+ # client = Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new
1957
+ #
1958
+ # # Create a request. To set request fields, pass in keyword arguments.
1959
+ # request = Google::Cloud::Notebooks::V1beta1::DeleteEnvironmentRequest.new
1960
+ #
1961
+ # # Call the delete_environment method.
1962
+ # result = client.delete_environment request
1963
+ #
1964
+ # # The returned object is of type Gapic::Operation. You can use this
1965
+ # # object to check the status of an operation, cancel it, or wait
1966
+ # # for results. Here is how to block until completion:
1967
+ # result.wait_until_done! timeout: 60
1968
+ # if result.response?
1969
+ # p result.response
1970
+ # else
1971
+ # puts "Error!"
1972
+ # end
1973
+ #
1515
1974
  def delete_environment request, options = nil
1516
1975
  raise ::ArgumentError, "request must be provided" if request.nil?
1517
1976
 
@@ -1529,16 +1988,20 @@ module Google
1529
1988
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
1530
1989
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1531
1990
 
1532
- header_params = {
1533
- "name" => request.name
1534
- }
1991
+ header_params = {}
1992
+ if request.name
1993
+ header_params["name"] = request.name
1994
+ end
1995
+
1535
1996
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1536
1997
  metadata[:"x-goog-request-params"] ||= request_params_header
1537
1998
 
1538
1999
  options.apply_defaults timeout: @config.rpcs.delete_environment.timeout,
1539
2000
  metadata: metadata,
1540
2001
  retry_policy: @config.rpcs.delete_environment.retry_policy
1541
- options.apply_defaults metadata: @config.metadata,
2002
+
2003
+ options.apply_defaults timeout: @config.timeout,
2004
+ metadata: @config.metadata,
1542
2005
  retry_policy: @config.retry_policy
1543
2006
 
1544
2007
  @notebook_service_stub.call_rpc :delete_environment, request, options: options do |response, operation|
@@ -1563,22 +2026,21 @@ module Google
1563
2026
  # Configuration can be applied globally to all clients, or to a single client
1564
2027
  # on construction.
1565
2028
  #
1566
- # # Examples
1567
- #
1568
- # To modify the global config, setting the timeout for list_instances
1569
- # to 20 seconds, and all remaining timeouts to 10 seconds:
1570
- #
1571
- # ::Google::Cloud::Notebooks::V1beta1::NotebookService::Client.configure do |config|
1572
- # config.timeout = 10.0
1573
- # config.rpcs.list_instances.timeout = 20.0
1574
- # end
1575
- #
1576
- # To apply the above configuration only to a new client:
1577
- #
1578
- # client = ::Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new do |config|
1579
- # config.timeout = 10.0
1580
- # config.rpcs.list_instances.timeout = 20.0
1581
- # end
2029
+ # @example
2030
+ #
2031
+ # # Modify the global config, setting the timeout for
2032
+ # # list_instances to 20 seconds,
2033
+ # # and all remaining timeouts to 10 seconds.
2034
+ # ::Google::Cloud::Notebooks::V1beta1::NotebookService::Client.configure do |config|
2035
+ # config.timeout = 10.0
2036
+ # config.rpcs.list_instances.timeout = 20.0
2037
+ # end
2038
+ #
2039
+ # # Apply the above configuration only to a new client.
2040
+ # client = ::Google::Cloud::Notebooks::V1beta1::NotebookService::Client.new do |config|
2041
+ # config.timeout = 10.0
2042
+ # config.rpcs.list_instances.timeout = 20.0
2043
+ # end
1582
2044
  #
1583
2045
  # @!attribute [rw] endpoint
1584
2046
  # The hostname or hostname:port of the service endpoint.