google-cloud-notebooks-v1 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d884bc378b2bbf1ebeea99cd6a72077f43e66818a03d7bdab56874f36fa2c973
4
- data.tar.gz: a0204f9cb8142dcca62118bd33c66fb23a32447670904df3b09fc55681cae774
3
+ metadata.gz: c7c9f2c9231a0b8c6ac3dfc43882e49dfec55088c2a9220a14b8d63b7ad9534b
4
+ data.tar.gz: b0333fcf6c28fc56d8d323923af7598a8a4e186da6ea011ff2adcad8eab9b944
5
5
  SHA512:
6
- metadata.gz: ed09aab991d0854d3e75bf2a8b88b203b18c692ee90b767a69e0b567597052d0f1be3893e66501b03d04363b2101f952b232e3008e7b78c468cf56d48d7b3a0b
7
- data.tar.gz: 2f59d5e5bad706b5f826bae1233ff828607a2177c6080592d9210863e730d90d348af2c600c0fc48fbd76cee638c9be002646714b751130ebc361bf0dfc22769
6
+ metadata.gz: 2d9f70d06548e713db7395ac246993cb6faa2ae923f14d0d16784c11eb91da9e3424f6af61c319e36dff777f17f5cd46e0827eb9aeda9351d62039bb17547bf5
7
+ data.tar.gz: 9a054cc91ee8ef64c255953dc49497606330a5001f2a76169feae6730cfc49302f2e0d3ae793c00048926cb298281e8a3bced323ab838bdc105db027a5c6b5d0
@@ -150,7 +150,7 @@ module Google
150
150
  credentials = @config.credentials
151
151
  # Use self-signed JWT if the endpoint is unchanged from default,
152
152
  # but only if the default endpoint does not have a region prefix.
153
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
153
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
154
154
  !@config.endpoint.split(".").first.include?("-")
155
155
  credentials ||= Credentials.default scope: @config.scope,
156
156
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -183,7 +183,8 @@ module Google
183
183
  credentials: credentials,
184
184
  endpoint: @config.endpoint,
185
185
  channel_args: @config.channel_args,
186
- interceptors: @config.interceptors
186
+ interceptors: @config.interceptors,
187
+ channel_pool_config: @config.channel_pool
187
188
  )
188
189
  end
189
190
 
@@ -1567,7 +1568,9 @@ module Google
1567
1568
  class Configuration
1568
1569
  extend ::Gapic::Config
1569
1570
 
1570
- config_attr :endpoint, "notebooks.googleapis.com", ::String
1571
+ DEFAULT_ENDPOINT = "notebooks.googleapis.com"
1572
+
1573
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1571
1574
  config_attr :credentials, nil do |value|
1572
1575
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1573
1576
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -1602,6 +1605,14 @@ module Google
1602
1605
  end
1603
1606
  end
1604
1607
 
1608
+ ##
1609
+ # Configuration for the channel pool
1610
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
1611
+ #
1612
+ def channel_pool
1613
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
1614
+ end
1615
+
1605
1616
  ##
1606
1617
  # Configuration RPC class for the ManagedNotebookService API.
1607
1618
  #
@@ -93,7 +93,8 @@ module Google
93
93
  credentials: credentials,
94
94
  endpoint: @config.endpoint,
95
95
  channel_args: @config.channel_args,
96
- interceptors: @config.interceptors
96
+ interceptors: @config.interceptors,
97
+ channel_pool_config: @config.channel_pool
97
98
  )
98
99
 
99
100
  # Used by an LRO wrapper for some methods of this service
@@ -664,7 +665,9 @@ module Google
664
665
  class Configuration
665
666
  extend ::Gapic::Config
666
667
 
667
- config_attr :endpoint, "notebooks.googleapis.com", ::String
668
+ DEFAULT_ENDPOINT = "notebooks.googleapis.com"
669
+
670
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
668
671
  config_attr :credentials, nil do |value|
669
672
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
670
673
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -699,6 +702,14 @@ module Google
699
702
  end
700
703
  end
701
704
 
705
+ ##
706
+ # Configuration for the channel pool
707
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
708
+ #
709
+ def channel_pool
710
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
711
+ end
712
+
702
713
  ##
703
714
  # Configuration RPC class for the Operations API.
704
715
  #
@@ -146,7 +146,7 @@ module Google
146
146
  credentials = @config.credentials
147
147
  # Use self-signed JWT if the endpoint is unchanged from default,
148
148
  # but only if the default endpoint does not have a region prefix.
149
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
149
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
150
150
  !@config.endpoint.split(".").first.include?("-")
151
151
  credentials ||= Credentials.default scope: @config.scope,
152
152
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -236,6 +236,26 @@ module Google
236
236
  # @return [::Google::Cloud::Notebooks::V1::ListRuntimesResponse]
237
237
  #
238
238
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
239
+ #
240
+ # @example Basic example
241
+ # require "google/cloud/notebooks/v1"
242
+ #
243
+ # # Create a client object. The client can be reused for multiple calls.
244
+ # client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new
245
+ #
246
+ # # Create a request. To set request fields, pass in keyword arguments.
247
+ # request = Google::Cloud::Notebooks::V1::ListRuntimesRequest.new
248
+ #
249
+ # # Call the list_runtimes method.
250
+ # result = client.list_runtimes request
251
+ #
252
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
253
+ # # over elements, and API calls will be issued to fetch pages as needed.
254
+ # result.each do |item|
255
+ # # Each element is of type ::Google::Cloud::Notebooks::V1::Runtime.
256
+ # p item
257
+ # end
258
+ #
239
259
  def list_runtimes request, options = nil
240
260
  raise ::ArgumentError, "request must be provided" if request.nil?
241
261
 
@@ -300,6 +320,22 @@ module Google
300
320
  # @return [::Google::Cloud::Notebooks::V1::Runtime]
301
321
  #
302
322
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
323
+ #
324
+ # @example Basic example
325
+ # require "google/cloud/notebooks/v1"
326
+ #
327
+ # # Create a client object. The client can be reused for multiple calls.
328
+ # client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new
329
+ #
330
+ # # Create a request. To set request fields, pass in keyword arguments.
331
+ # request = Google::Cloud::Notebooks::V1::GetRuntimeRequest.new
332
+ #
333
+ # # Call the get_runtime method.
334
+ # result = client.get_runtime request
335
+ #
336
+ # # The returned object is of type Google::Cloud::Notebooks::V1::Runtime.
337
+ # p result
338
+ #
303
339
  def get_runtime request, options = nil
304
340
  raise ::ArgumentError, "request must be provided" if request.nil?
305
341
 
@@ -369,6 +405,29 @@ module Google
369
405
  # @return [::Gapic::Operation]
370
406
  #
371
407
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
408
+ #
409
+ # @example Basic example
410
+ # require "google/cloud/notebooks/v1"
411
+ #
412
+ # # Create a client object. The client can be reused for multiple calls.
413
+ # client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new
414
+ #
415
+ # # Create a request. To set request fields, pass in keyword arguments.
416
+ # request = Google::Cloud::Notebooks::V1::CreateRuntimeRequest.new
417
+ #
418
+ # # Call the create_runtime method.
419
+ # result = client.create_runtime request
420
+ #
421
+ # # The returned object is of type Gapic::Operation. You can use it to
422
+ # # check the status of an operation, cancel it, or wait for results.
423
+ # # Here is how to wait for a response.
424
+ # result.wait_until_done! timeout: 60
425
+ # if result.response?
426
+ # p result.response
427
+ # else
428
+ # puts "No response received."
429
+ # end
430
+ #
372
431
  def create_runtime request, options = nil
373
432
  raise ::ArgumentError, "request must be provided" if request.nil?
374
433
 
@@ -458,6 +517,29 @@ module Google
458
517
  # @return [::Gapic::Operation]
459
518
  #
460
519
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
520
+ #
521
+ # @example Basic example
522
+ # require "google/cloud/notebooks/v1"
523
+ #
524
+ # # Create a client object. The client can be reused for multiple calls.
525
+ # client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new
526
+ #
527
+ # # Create a request. To set request fields, pass in keyword arguments.
528
+ # request = Google::Cloud::Notebooks::V1::UpdateRuntimeRequest.new
529
+ #
530
+ # # Call the update_runtime method.
531
+ # result = client.update_runtime request
532
+ #
533
+ # # The returned object is of type Gapic::Operation. You can use it to
534
+ # # check the status of an operation, cancel it, or wait for results.
535
+ # # Here is how to wait for a response.
536
+ # result.wait_until_done! timeout: 60
537
+ # if result.response?
538
+ # p result.response
539
+ # else
540
+ # puts "No response received."
541
+ # end
542
+ #
461
543
  def update_runtime request, options = nil
462
544
  raise ::ArgumentError, "request must be provided" if request.nil?
463
545
 
@@ -524,6 +606,29 @@ module Google
524
606
  # @return [::Gapic::Operation]
525
607
  #
526
608
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
609
+ #
610
+ # @example Basic example
611
+ # require "google/cloud/notebooks/v1"
612
+ #
613
+ # # Create a client object. The client can be reused for multiple calls.
614
+ # client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new
615
+ #
616
+ # # Create a request. To set request fields, pass in keyword arguments.
617
+ # request = Google::Cloud::Notebooks::V1::DeleteRuntimeRequest.new
618
+ #
619
+ # # Call the delete_runtime method.
620
+ # result = client.delete_runtime request
621
+ #
622
+ # # The returned object is of type Gapic::Operation. You can use it to
623
+ # # check the status of an operation, cancel it, or wait for results.
624
+ # # Here is how to wait for a response.
625
+ # result.wait_until_done! timeout: 60
626
+ # if result.response?
627
+ # p result.response
628
+ # else
629
+ # puts "No response received."
630
+ # end
631
+ #
527
632
  def delete_runtime request, options = nil
528
633
  raise ::ArgumentError, "request must be provided" if request.nil?
529
634
 
@@ -594,6 +699,29 @@ module Google
594
699
  # @return [::Gapic::Operation]
595
700
  #
596
701
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
702
+ #
703
+ # @example Basic example
704
+ # require "google/cloud/notebooks/v1"
705
+ #
706
+ # # Create a client object. The client can be reused for multiple calls.
707
+ # client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new
708
+ #
709
+ # # Create a request. To set request fields, pass in keyword arguments.
710
+ # request = Google::Cloud::Notebooks::V1::StartRuntimeRequest.new
711
+ #
712
+ # # Call the start_runtime method.
713
+ # result = client.start_runtime request
714
+ #
715
+ # # The returned object is of type Gapic::Operation. You can use it to
716
+ # # check the status of an operation, cancel it, or wait for results.
717
+ # # Here is how to wait for a response.
718
+ # result.wait_until_done! timeout: 60
719
+ # if result.response?
720
+ # p result.response
721
+ # else
722
+ # puts "No response received."
723
+ # end
724
+ #
597
725
  def start_runtime request, options = nil
598
726
  raise ::ArgumentError, "request must be provided" if request.nil?
599
727
 
@@ -664,6 +792,29 @@ module Google
664
792
  # @return [::Gapic::Operation]
665
793
  #
666
794
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
795
+ #
796
+ # @example Basic example
797
+ # require "google/cloud/notebooks/v1"
798
+ #
799
+ # # Create a client object. The client can be reused for multiple calls.
800
+ # client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new
801
+ #
802
+ # # Create a request. To set request fields, pass in keyword arguments.
803
+ # request = Google::Cloud::Notebooks::V1::StopRuntimeRequest.new
804
+ #
805
+ # # Call the stop_runtime method.
806
+ # result = client.stop_runtime request
807
+ #
808
+ # # The returned object is of type Gapic::Operation. You can use it to
809
+ # # check the status of an operation, cancel it, or wait for results.
810
+ # # Here is how to wait for a response.
811
+ # result.wait_until_done! timeout: 60
812
+ # if result.response?
813
+ # p result.response
814
+ # else
815
+ # puts "No response received."
816
+ # end
817
+ #
667
818
  def stop_runtime request, options = nil
668
819
  raise ::ArgumentError, "request must be provided" if request.nil?
669
820
 
@@ -734,6 +885,29 @@ module Google
734
885
  # @return [::Gapic::Operation]
735
886
  #
736
887
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
888
+ #
889
+ # @example Basic example
890
+ # require "google/cloud/notebooks/v1"
891
+ #
892
+ # # Create a client object. The client can be reused for multiple calls.
893
+ # client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new
894
+ #
895
+ # # Create a request. To set request fields, pass in keyword arguments.
896
+ # request = Google::Cloud::Notebooks::V1::SwitchRuntimeRequest.new
897
+ #
898
+ # # Call the switch_runtime method.
899
+ # result = client.switch_runtime request
900
+ #
901
+ # # The returned object is of type Gapic::Operation. You can use it to
902
+ # # check the status of an operation, cancel it, or wait for results.
903
+ # # Here is how to wait for a response.
904
+ # result.wait_until_done! timeout: 60
905
+ # if result.response?
906
+ # p result.response
907
+ # else
908
+ # puts "No response received."
909
+ # end
910
+ #
737
911
  def switch_runtime request, options = nil
738
912
  raise ::ArgumentError, "request must be provided" if request.nil?
739
913
 
@@ -800,6 +974,29 @@ module Google
800
974
  # @return [::Gapic::Operation]
801
975
  #
802
976
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
977
+ #
978
+ # @example Basic example
979
+ # require "google/cloud/notebooks/v1"
980
+ #
981
+ # # Create a client object. The client can be reused for multiple calls.
982
+ # client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new
983
+ #
984
+ # # Create a request. To set request fields, pass in keyword arguments.
985
+ # request = Google::Cloud::Notebooks::V1::ResetRuntimeRequest.new
986
+ #
987
+ # # Call the reset_runtime method.
988
+ # result = client.reset_runtime request
989
+ #
990
+ # # The returned object is of type Gapic::Operation. You can use it to
991
+ # # check the status of an operation, cancel it, or wait for results.
992
+ # # Here is how to wait for a response.
993
+ # result.wait_until_done! timeout: 60
994
+ # if result.response?
995
+ # p result.response
996
+ # else
997
+ # puts "No response received."
998
+ # end
999
+ #
803
1000
  def reset_runtime request, options = nil
804
1001
  raise ::ArgumentError, "request must be provided" if request.nil?
805
1002
 
@@ -866,6 +1063,29 @@ module Google
866
1063
  # @return [::Gapic::Operation]
867
1064
  #
868
1065
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1066
+ #
1067
+ # @example Basic example
1068
+ # require "google/cloud/notebooks/v1"
1069
+ #
1070
+ # # Create a client object. The client can be reused for multiple calls.
1071
+ # client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new
1072
+ #
1073
+ # # Create a request. To set request fields, pass in keyword arguments.
1074
+ # request = Google::Cloud::Notebooks::V1::UpgradeRuntimeRequest.new
1075
+ #
1076
+ # # Call the upgrade_runtime method.
1077
+ # result = client.upgrade_runtime request
1078
+ #
1079
+ # # The returned object is of type Gapic::Operation. You can use it to
1080
+ # # check the status of an operation, cancel it, or wait for results.
1081
+ # # Here is how to wait for a response.
1082
+ # result.wait_until_done! timeout: 60
1083
+ # if result.response?
1084
+ # p result.response
1085
+ # else
1086
+ # puts "No response received."
1087
+ # end
1088
+ #
869
1089
  def upgrade_runtime request, options = nil
870
1090
  raise ::ArgumentError, "request must be provided" if request.nil?
871
1091
 
@@ -935,6 +1155,29 @@ module Google
935
1155
  # @return [::Gapic::Operation]
936
1156
  #
937
1157
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1158
+ #
1159
+ # @example Basic example
1160
+ # require "google/cloud/notebooks/v1"
1161
+ #
1162
+ # # Create a client object. The client can be reused for multiple calls.
1163
+ # client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new
1164
+ #
1165
+ # # Create a request. To set request fields, pass in keyword arguments.
1166
+ # request = Google::Cloud::Notebooks::V1::ReportRuntimeEventRequest.new
1167
+ #
1168
+ # # Call the report_runtime_event method.
1169
+ # result = client.report_runtime_event request
1170
+ #
1171
+ # # The returned object is of type Gapic::Operation. You can use it to
1172
+ # # check the status of an operation, cancel it, or wait for results.
1173
+ # # Here is how to wait for a response.
1174
+ # result.wait_until_done! timeout: 60
1175
+ # if result.response?
1176
+ # p result.response
1177
+ # else
1178
+ # puts "No response received."
1179
+ # end
1180
+ #
938
1181
  def report_runtime_event request, options = nil
939
1182
  raise ::ArgumentError, "request must be provided" if request.nil?
940
1183
 
@@ -1003,6 +1246,22 @@ module Google
1003
1246
  # @return [::Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalResponse]
1004
1247
  #
1005
1248
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1249
+ #
1250
+ # @example Basic example
1251
+ # require "google/cloud/notebooks/v1"
1252
+ #
1253
+ # # Create a client object. The client can be reused for multiple calls.
1254
+ # client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new
1255
+ #
1256
+ # # Create a request. To set request fields, pass in keyword arguments.
1257
+ # request = Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalRequest.new
1258
+ #
1259
+ # # Call the refresh_runtime_token_internal method.
1260
+ # result = client.refresh_runtime_token_internal request
1261
+ #
1262
+ # # The returned object is of type Google::Cloud::Notebooks::V1::RefreshRuntimeTokenInternalResponse.
1263
+ # p result
1264
+ #
1006
1265
  def refresh_runtime_token_internal request, options = nil
1007
1266
  raise ::ArgumentError, "request must be provided" if request.nil?
1008
1267
 
@@ -1068,6 +1327,29 @@ module Google
1068
1327
  # @return [::Gapic::Operation]
1069
1328
  #
1070
1329
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
1330
+ #
1331
+ # @example Basic example
1332
+ # require "google/cloud/notebooks/v1"
1333
+ #
1334
+ # # Create a client object. The client can be reused for multiple calls.
1335
+ # client = Google::Cloud::Notebooks::V1::ManagedNotebookService::Rest::Client.new
1336
+ #
1337
+ # # Create a request. To set request fields, pass in keyword arguments.
1338
+ # request = Google::Cloud::Notebooks::V1::DiagnoseRuntimeRequest.new
1339
+ #
1340
+ # # Call the diagnose_runtime method.
1341
+ # result = client.diagnose_runtime request
1342
+ #
1343
+ # # The returned object is of type Gapic::Operation. You can use it to
1344
+ # # check the status of an operation, cancel it, or wait for results.
1345
+ # # Here is how to wait for a response.
1346
+ # result.wait_until_done! timeout: 60
1347
+ # if result.response?
1348
+ # p result.response
1349
+ # else
1350
+ # puts "No response received."
1351
+ # end
1352
+ #
1071
1353
  def diagnose_runtime request, options = nil
1072
1354
  raise ::ArgumentError, "request must be provided" if request.nil?
1073
1355
 
@@ -1177,7 +1459,9 @@ module Google
1177
1459
  class Configuration
1178
1460
  extend ::Gapic::Config
1179
1461
 
1180
- config_attr :endpoint, "notebooks.googleapis.com", ::String
1462
+ DEFAULT_ENDPOINT = "notebooks.googleapis.com"
1463
+
1464
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
1181
1465
  config_attr :credentials, nil do |value|
1182
1466
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
1183
1467
  allowed.any? { |klass| klass === value }
@@ -136,6 +136,26 @@ module Google
136
136
  # @return [::Gapic::Operation]
137
137
  #
138
138
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
139
+ #
140
+ # @example Basic example
141
+ # require "google/longrunning"
142
+ #
143
+ # # Create a client object. The client can be reused for multiple calls.
144
+ # client = Google::Longrunning::Operations::Rest::Client.new
145
+ #
146
+ # # Create a request. To set request fields, pass in keyword arguments.
147
+ # request = Google::Longrunning::ListOperationsRequest.new
148
+ #
149
+ # # Call the list_operations method.
150
+ # result = client.list_operations request
151
+ #
152
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
153
+ # # over elements, and API calls will be issued to fetch pages as needed.
154
+ # result.each do |item|
155
+ # # Each element is of type ::Google::Longrunning::Operation.
156
+ # p item
157
+ # end
158
+ #
139
159
  def list_operations request, options = nil
140
160
  raise ::ArgumentError, "request must be provided" if request.nil?
141
161
 
@@ -201,6 +221,29 @@ module Google
201
221
  # @return [::Gapic::Operation]
202
222
  #
203
223
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
224
+ #
225
+ # @example Basic example
226
+ # require "google/longrunning"
227
+ #
228
+ # # Create a client object. The client can be reused for multiple calls.
229
+ # client = Google::Longrunning::Operations::Rest::Client.new
230
+ #
231
+ # # Create a request. To set request fields, pass in keyword arguments.
232
+ # request = Google::Longrunning::GetOperationRequest.new
233
+ #
234
+ # # Call the get_operation method.
235
+ # result = client.get_operation request
236
+ #
237
+ # # The returned object is of type Gapic::Operation. You can use it to
238
+ # # check the status of an operation, cancel it, or wait for results.
239
+ # # Here is how to wait for a response.
240
+ # result.wait_until_done! timeout: 60
241
+ # if result.response?
242
+ # p result.response
243
+ # else
244
+ # puts "No response received."
245
+ # end
246
+ #
204
247
  def get_operation request, options = nil
205
248
  raise ::ArgumentError, "request must be provided" if request.nil?
206
249
 
@@ -267,6 +310,22 @@ module Google
267
310
  # @return [::Google::Protobuf::Empty]
268
311
  #
269
312
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
313
+ #
314
+ # @example Basic example
315
+ # require "google/longrunning"
316
+ #
317
+ # # Create a client object. The client can be reused for multiple calls.
318
+ # client = Google::Longrunning::Operations::Rest::Client.new
319
+ #
320
+ # # Create a request. To set request fields, pass in keyword arguments.
321
+ # request = Google::Longrunning::DeleteOperationRequest.new
322
+ #
323
+ # # Call the delete_operation method.
324
+ # result = client.delete_operation request
325
+ #
326
+ # # The returned object is of type Google::Protobuf::Empty.
327
+ # p result
328
+ #
270
329
  def delete_operation request, options = nil
271
330
  raise ::ArgumentError, "request must be provided" if request.nil?
272
331
 
@@ -338,6 +397,22 @@ module Google
338
397
  # @return [::Google::Protobuf::Empty]
339
398
  #
340
399
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
400
+ #
401
+ # @example Basic example
402
+ # require "google/longrunning"
403
+ #
404
+ # # Create a client object. The client can be reused for multiple calls.
405
+ # client = Google::Longrunning::Operations::Rest::Client.new
406
+ #
407
+ # # Create a request. To set request fields, pass in keyword arguments.
408
+ # request = Google::Longrunning::CancelOperationRequest.new
409
+ #
410
+ # # Call the cancel_operation method.
411
+ # result = client.cancel_operation request
412
+ #
413
+ # # The returned object is of type Google::Protobuf::Empty.
414
+ # p result
415
+ #
341
416
  def cancel_operation request, options = nil
342
417
  raise ::ArgumentError, "request must be provided" if request.nil?
343
418
 
@@ -446,7 +521,9 @@ module Google
446
521
  class Configuration
447
522
  extend ::Gapic::Config
448
523
 
449
- config_attr :endpoint, "notebooks.googleapis.com", ::String
524
+ DEFAULT_ENDPOINT = "notebooks.googleapis.com"
525
+
526
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
450
527
  config_attr :credentials, nil do |value|
451
528
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
452
529
  allowed.any? { |klass| klass === value }
@@ -567,7 +644,7 @@ module Google
567
644
 
568
645
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
569
646
  query_string_params = if query_string_params.any?
570
- query_string_params.to_h { |p| p.split("=", 2) }
647
+ query_string_params.to_h { |p| p.split "=", 2 }
571
648
  else
572
649
  {}
573
650
  end
@@ -605,7 +682,7 @@ module Google
605
682
 
606
683
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
607
684
  query_string_params = if query_string_params.any?
608
- query_string_params.to_h { |p| p.split("=", 2) }
685
+ query_string_params.to_h { |p| p.split "=", 2 }
609
686
  else
610
687
  {}
611
688
  end
@@ -643,7 +720,7 @@ module Google
643
720
 
644
721
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
645
722
  query_string_params = if query_string_params.any?
646
- query_string_params.to_h { |p| p.split("=", 2) }
723
+ query_string_params.to_h { |p| p.split "=", 2 }
647
724
  else
648
725
  {}
649
726
  end
@@ -681,7 +758,7 @@ module Google
681
758
 
682
759
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
683
760
  query_string_params = if query_string_params.any?
684
- query_string_params.to_h { |p| p.split("=", 2) }
761
+ query_string_params.to_h { |p| p.split "=", 2 }
685
762
  else
686
763
  {}
687
764
  end