google-cloud-notebooks-v1beta1 0.4.3 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -178,6 +178,7 @@ module Google
178
178
 
179
179
  @operations_client = Operations.new do |config|
180
180
  config.credentials = credentials
181
+ config.quota_project = @quota_project_id
181
182
  config.endpoint = @config.endpoint
182
183
  end
183
184
 
@@ -234,6 +235,27 @@ module Google
234
235
  #
235
236
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
236
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
+ #
237
259
  def list_instances request, options = nil
238
260
  raise ::ArgumentError, "request must be provided" if request.nil?
239
261
 
@@ -251,9 +273,11 @@ module Google
251
273
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
252
274
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
253
275
 
254
- header_params = {
255
- "parent" => request.parent
256
- }
276
+ header_params = {}
277
+ if request.parent
278
+ header_params["parent"] = request.parent
279
+ end
280
+
257
281
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
258
282
  metadata[:"x-goog-request-params"] ||= request_params_header
259
283
 
@@ -304,6 +328,21 @@ module Google
304
328
  #
305
329
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
306
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
+ #
307
346
  def get_instance request, options = nil
308
347
  raise ::ArgumentError, "request must be provided" if request.nil?
309
348
 
@@ -321,9 +360,11 @@ module Google
321
360
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
322
361
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
323
362
 
324
- header_params = {
325
- "name" => request.name
326
- }
363
+ header_params = {}
364
+ if request.name
365
+ header_params["name"] = request.name
366
+ end
367
+
327
368
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
328
369
  metadata[:"x-goog-request-params"] ||= request_params_header
329
370
 
@@ -377,6 +418,28 @@ module Google
377
418
  #
378
419
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
379
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
+ #
380
443
  def create_instance request, options = nil
381
444
  raise ::ArgumentError, "request must be provided" if request.nil?
382
445
 
@@ -394,9 +457,11 @@ module Google
394
457
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
395
458
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
396
459
 
397
- header_params = {
398
- "parent" => request.parent
399
- }
460
+ header_params = {}
461
+ if request.parent
462
+ header_params["parent"] = request.parent
463
+ end
464
+
400
465
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
401
466
  metadata[:"x-goog-request-params"] ||= request_params_header
402
467
 
@@ -455,6 +520,28 @@ module Google
455
520
  #
456
521
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
457
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
+ #
458
545
  def register_instance request, options = nil
459
546
  raise ::ArgumentError, "request must be provided" if request.nil?
460
547
 
@@ -472,9 +559,11 @@ module Google
472
559
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
473
560
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
474
561
 
475
- header_params = {
476
- "parent" => request.parent
477
- }
562
+ header_params = {}
563
+ if request.parent
564
+ header_params["parent"] = request.parent
565
+ end
566
+
478
567
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
479
568
  metadata[:"x-goog-request-params"] ||= request_params_header
480
569
 
@@ -532,6 +621,28 @@ module Google
532
621
  #
533
622
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
534
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
+ #
535
646
  def set_instance_accelerator request, options = nil
536
647
  raise ::ArgumentError, "request must be provided" if request.nil?
537
648
 
@@ -549,9 +660,11 @@ module Google
549
660
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
550
661
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
551
662
 
552
- header_params = {
553
- "name" => request.name
554
- }
663
+ header_params = {}
664
+ if request.name
665
+ header_params["name"] = request.name
666
+ end
667
+
555
668
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
556
669
  metadata[:"x-goog-request-params"] ||= request_params_header
557
670
 
@@ -605,6 +718,28 @@ module Google
605
718
  #
606
719
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
607
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
+ #
608
743
  def set_instance_machine_type request, options = nil
609
744
  raise ::ArgumentError, "request must be provided" if request.nil?
610
745
 
@@ -622,9 +757,11 @@ module Google
622
757
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
623
758
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
624
759
 
625
- header_params = {
626
- "name" => request.name
627
- }
760
+ header_params = {}
761
+ if request.name
762
+ header_params["name"] = request.name
763
+ end
764
+
628
765
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
629
766
  metadata[:"x-goog-request-params"] ||= request_params_header
630
767
 
@@ -678,6 +815,28 @@ module Google
678
815
  #
679
816
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
680
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
+ #
681
840
  def set_instance_labels request, options = nil
682
841
  raise ::ArgumentError, "request must be provided" if request.nil?
683
842
 
@@ -695,9 +854,11 @@ module Google
695
854
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
696
855
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
697
856
 
698
- header_params = {
699
- "name" => request.name
700
- }
857
+ header_params = {}
858
+ if request.name
859
+ header_params["name"] = request.name
860
+ end
861
+
701
862
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
702
863
  metadata[:"x-goog-request-params"] ||= request_params_header
703
864
 
@@ -748,6 +909,28 @@ module Google
748
909
  #
749
910
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
750
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
+ #
751
934
  def delete_instance request, options = nil
752
935
  raise ::ArgumentError, "request must be provided" if request.nil?
753
936
 
@@ -765,9 +948,11 @@ module Google
765
948
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
766
949
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
767
950
 
768
- header_params = {
769
- "name" => request.name
770
- }
951
+ header_params = {}
952
+ if request.name
953
+ header_params["name"] = request.name
954
+ end
955
+
771
956
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
772
957
  metadata[:"x-goog-request-params"] ||= request_params_header
773
958
 
@@ -818,6 +1003,28 @@ module Google
818
1003
  #
819
1004
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
820
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
+ #
821
1028
  def start_instance request, options = nil
822
1029
  raise ::ArgumentError, "request must be provided" if request.nil?
823
1030
 
@@ -835,9 +1042,11 @@ module Google
835
1042
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
836
1043
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
837
1044
 
838
- header_params = {
839
- "name" => request.name
840
- }
1045
+ header_params = {}
1046
+ if request.name
1047
+ header_params["name"] = request.name
1048
+ end
1049
+
841
1050
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
842
1051
  metadata[:"x-goog-request-params"] ||= request_params_header
843
1052
 
@@ -888,6 +1097,28 @@ module Google
888
1097
  #
889
1098
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
890
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
+ #
891
1122
  def stop_instance request, options = nil
892
1123
  raise ::ArgumentError, "request must be provided" if request.nil?
893
1124
 
@@ -905,9 +1136,11 @@ module Google
905
1136
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
906
1137
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
907
1138
 
908
- header_params = {
909
- "name" => request.name
910
- }
1139
+ header_params = {}
1140
+ if request.name
1141
+ header_params["name"] = request.name
1142
+ end
1143
+
911
1144
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
912
1145
  metadata[:"x-goog-request-params"] ||= request_params_header
913
1146
 
@@ -958,6 +1191,28 @@ module Google
958
1191
  #
959
1192
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
960
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
+ #
961
1216
  def reset_instance request, options = nil
962
1217
  raise ::ArgumentError, "request must be provided" if request.nil?
963
1218
 
@@ -975,9 +1230,11 @@ module Google
975
1230
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
976
1231
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
977
1232
 
978
- header_params = {
979
- "name" => request.name
980
- }
1233
+ header_params = {}
1234
+ if request.name
1235
+ header_params["name"] = request.name
1236
+ end
1237
+
981
1238
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
982
1239
  metadata[:"x-goog-request-params"] ||= request_params_header
983
1240
 
@@ -1037,6 +1294,28 @@ module Google
1037
1294
  #
1038
1295
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1039
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
+ #
1040
1319
  def report_instance_info request, options = nil
1041
1320
  raise ::ArgumentError, "request must be provided" if request.nil?
1042
1321
 
@@ -1054,9 +1333,11 @@ module Google
1054
1333
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
1055
1334
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1056
1335
 
1057
- header_params = {
1058
- "name" => request.name
1059
- }
1336
+ header_params = {}
1337
+ if request.name
1338
+ header_params["name"] = request.name
1339
+ end
1340
+
1060
1341
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1061
1342
  metadata[:"x-goog-request-params"] ||= request_params_header
1062
1343
 
@@ -1107,6 +1388,21 @@ module Google
1107
1388
  #
1108
1389
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1109
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
+ #
1110
1406
  def is_instance_upgradeable request, options = nil
1111
1407
  raise ::ArgumentError, "request must be provided" if request.nil?
1112
1408
 
@@ -1124,9 +1420,11 @@ module Google
1124
1420
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
1125
1421
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1126
1422
 
1127
- header_params = {
1128
- "notebook_instance" => request.notebook_instance
1129
- }
1423
+ header_params = {}
1424
+ if request.notebook_instance
1425
+ header_params["notebook_instance"] = request.notebook_instance
1426
+ end
1427
+
1130
1428
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1131
1429
  metadata[:"x-goog-request-params"] ||= request_params_header
1132
1430
 
@@ -1176,6 +1474,28 @@ module Google
1176
1474
  #
1177
1475
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1178
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
+ #
1179
1499
  def upgrade_instance request, options = nil
1180
1500
  raise ::ArgumentError, "request must be provided" if request.nil?
1181
1501
 
@@ -1193,9 +1513,11 @@ module Google
1193
1513
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
1194
1514
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1195
1515
 
1196
- header_params = {
1197
- "name" => request.name
1198
- }
1516
+ header_params = {}
1517
+ if request.name
1518
+ header_params["name"] = request.name
1519
+ end
1520
+
1199
1521
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1200
1522
  metadata[:"x-goog-request-params"] ||= request_params_header
1201
1523
 
@@ -1250,6 +1572,28 @@ module Google
1250
1572
  #
1251
1573
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1252
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
+ #
1253
1597
  def upgrade_instance_internal request, options = nil
1254
1598
  raise ::ArgumentError, "request must be provided" if request.nil?
1255
1599
 
@@ -1267,9 +1611,11 @@ module Google
1267
1611
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
1268
1612
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1269
1613
 
1270
- header_params = {
1271
- "name" => request.name
1272
- }
1614
+ header_params = {}
1615
+ if request.name
1616
+ header_params["name"] = request.name
1617
+ end
1618
+
1273
1619
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1274
1620
  metadata[:"x-goog-request-params"] ||= request_params_header
1275
1621
 
@@ -1324,6 +1670,27 @@ module Google
1324
1670
  #
1325
1671
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1326
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
+ #
1327
1694
  def list_environments request, options = nil
1328
1695
  raise ::ArgumentError, "request must be provided" if request.nil?
1329
1696
 
@@ -1341,9 +1708,11 @@ module Google
1341
1708
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
1342
1709
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1343
1710
 
1344
- header_params = {
1345
- "parent" => request.parent
1346
- }
1711
+ header_params = {}
1712
+ if request.parent
1713
+ header_params["parent"] = request.parent
1714
+ end
1715
+
1347
1716
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1348
1717
  metadata[:"x-goog-request-params"] ||= request_params_header
1349
1718
 
@@ -1394,6 +1763,21 @@ module Google
1394
1763
  #
1395
1764
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1396
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
+ #
1397
1781
  def get_environment request, options = nil
1398
1782
  raise ::ArgumentError, "request must be provided" if request.nil?
1399
1783
 
@@ -1411,9 +1795,11 @@ module Google
1411
1795
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
1412
1796
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1413
1797
 
1414
- header_params = {
1415
- "name" => request.name
1416
- }
1798
+ header_params = {}
1799
+ if request.name
1800
+ header_params["name"] = request.name
1801
+ end
1802
+
1417
1803
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1418
1804
  metadata[:"x-goog-request-params"] ||= request_params_header
1419
1805
 
@@ -1469,6 +1855,28 @@ module Google
1469
1855
  #
1470
1856
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1471
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
+ #
1472
1880
  def create_environment request, options = nil
1473
1881
  raise ::ArgumentError, "request must be provided" if request.nil?
1474
1882
 
@@ -1486,9 +1894,11 @@ module Google
1486
1894
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
1487
1895
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1488
1896
 
1489
- header_params = {
1490
- "parent" => request.parent
1491
- }
1897
+ header_params = {}
1898
+ if request.parent
1899
+ header_params["parent"] = request.parent
1900
+ end
1901
+
1492
1902
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1493
1903
  metadata[:"x-goog-request-params"] ||= request_params_header
1494
1904
 
@@ -1539,6 +1949,28 @@ module Google
1539
1949
  #
1540
1950
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1541
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
+ #
1542
1974
  def delete_environment request, options = nil
1543
1975
  raise ::ArgumentError, "request must be provided" if request.nil?
1544
1976
 
@@ -1556,9 +1988,11 @@ module Google
1556
1988
  gapic_version: ::Google::Cloud::Notebooks::V1beta1::VERSION
1557
1989
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1558
1990
 
1559
- header_params = {
1560
- "name" => request.name
1561
- }
1991
+ header_params = {}
1992
+ if request.name
1993
+ header_params["name"] = request.name
1994
+ end
1995
+
1562
1996
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1563
1997
  metadata[:"x-goog-request-params"] ||= request_params_header
1564
1998