google-cloud-network_connectivity-v1 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31c5d8c3f32081a84a1788be4f7718af9c302b3376eb81ef64c0f305aeace8d8
4
- data.tar.gz: 200f1b7d55ca447a1f6349e0f7a0c757054da0660e6716968079e4d3e8b1257d
3
+ metadata.gz: ea018a74143b001473818d110e068bb90cb692e18cd9520b09bcc816486b2e0c
4
+ data.tar.gz: 10078f6b101008351f93c368cfcb403e49c3ae3417d08d7ac5a99866289a1e37
5
5
  SHA512:
6
- metadata.gz: e3c215ac655ec07b3dee9e9a017b4fdf362eb154784966bb6ab80a22dfdea1771119f23dcc8377ca3cad93b0f2688ca5d6cceec7f08a0759b9b0327903a9434f
7
- data.tar.gz: b797a1a022a2abfb48472ee174515c8d1ecad07ce6e64cf8cd6d7712540089bea7963a8c1f8a8b5f8f7b8c357595890bb18fd377a418d1fde8c6c8302b71b235
6
+ metadata.gz: 76ba9355e082dc06006c9149d5bbdc2668aca2e20bb60c5567242d95e5c646b015eb13115b014fbdae1f98178101952bece487edfcf0f403b12f6aad5e4b719e
7
+ data.tar.gz: 42a7348df4bf0c2dc6d0ee274e8511f6fb828db3f06bd8ddb83042e5d946fdcd0f28b2d3c81fc72603bdf4dad2147b38c7c61ec4a69299e8be2fb1859ef00c40
@@ -212,6 +212,27 @@ module Google
212
212
  #
213
213
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
214
214
  #
215
+ # @example Basic example
216
+ # require "google/cloud/network_connectivity/v1"
217
+ #
218
+ # # Create a client object. The client can be reused for multiple calls.
219
+ # client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
220
+ #
221
+ # # Create a request. To set request fields, pass in keyword arguments.
222
+ # request = Google::Cloud::NetworkConnectivity::V1::ListHubsRequest.new
223
+ #
224
+ # # Call the list_hubs method.
225
+ # result = client.list_hubs request
226
+ #
227
+ # # The returned object is of type Gapic::PagedEnumerable. You can
228
+ # # iterate over all elements by calling #each, and the enumerable
229
+ # # will lazily make API calls to fetch subsequent pages. Other
230
+ # # methods are also available for managing paging directly.
231
+ # result.each do |response|
232
+ # # Each element is of type ::Google::Cloud::NetworkConnectivity::V1::Hub.
233
+ # p response
234
+ # end
235
+ #
215
236
  def list_hubs request, options = nil
216
237
  raise ::ArgumentError, "request must be provided" if request.nil?
217
238
 
@@ -229,9 +250,11 @@ module Google
229
250
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
230
251
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
231
252
 
232
- header_params = {
233
- "parent" => request.parent
234
- }
253
+ header_params = {}
254
+ if request.parent
255
+ header_params["parent"] = request.parent
256
+ end
257
+
235
258
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
236
259
  metadata[:"x-goog-request-params"] ||= request_params_header
237
260
 
@@ -281,6 +304,21 @@ module Google
281
304
  #
282
305
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
283
306
  #
307
+ # @example Basic example
308
+ # require "google/cloud/network_connectivity/v1"
309
+ #
310
+ # # Create a client object. The client can be reused for multiple calls.
311
+ # client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
312
+ #
313
+ # # Create a request. To set request fields, pass in keyword arguments.
314
+ # request = Google::Cloud::NetworkConnectivity::V1::GetHubRequest.new
315
+ #
316
+ # # Call the get_hub method.
317
+ # result = client.get_hub request
318
+ #
319
+ # # The returned object is of type Google::Cloud::NetworkConnectivity::V1::Hub.
320
+ # p result
321
+ #
284
322
  def get_hub request, options = nil
285
323
  raise ::ArgumentError, "request must be provided" if request.nil?
286
324
 
@@ -298,9 +336,11 @@ module Google
298
336
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
299
337
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
300
338
 
301
- header_params = {
302
- "name" => request.name
303
- }
339
+ header_params = {}
340
+ if request.name
341
+ header_params["name"] = request.name
342
+ end
343
+
304
344
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
305
345
  metadata[:"x-goog-request-params"] ||= request_params_header
306
346
 
@@ -368,6 +408,28 @@ module Google
368
408
  #
369
409
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
370
410
  #
411
+ # @example Basic example
412
+ # require "google/cloud/network_connectivity/v1"
413
+ #
414
+ # # Create a client object. The client can be reused for multiple calls.
415
+ # client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
416
+ #
417
+ # # Create a request. To set request fields, pass in keyword arguments.
418
+ # request = Google::Cloud::NetworkConnectivity::V1::CreateHubRequest.new
419
+ #
420
+ # # Call the create_hub method.
421
+ # result = client.create_hub request
422
+ #
423
+ # # The returned object is of type Gapic::Operation. You can use this
424
+ # # object to check the status of an operation, cancel it, or wait
425
+ # # for results. Here is how to block until completion:
426
+ # result.wait_until_done! timeout: 60
427
+ # if result.response?
428
+ # p result.response
429
+ # else
430
+ # puts "Error!"
431
+ # end
432
+ #
371
433
  def create_hub request, options = nil
372
434
  raise ::ArgumentError, "request must be provided" if request.nil?
373
435
 
@@ -385,9 +447,11 @@ module Google
385
447
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
386
448
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
387
449
 
388
- header_params = {
389
- "parent" => request.parent
390
- }
450
+ header_params = {}
451
+ if request.parent
452
+ header_params["parent"] = request.parent
453
+ end
454
+
391
455
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
392
456
  metadata[:"x-goog-request-params"] ||= request_params_header
393
457
 
@@ -458,6 +522,28 @@ module Google
458
522
  #
459
523
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
460
524
  #
525
+ # @example Basic example
526
+ # require "google/cloud/network_connectivity/v1"
527
+ #
528
+ # # Create a client object. The client can be reused for multiple calls.
529
+ # client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
530
+ #
531
+ # # Create a request. To set request fields, pass in keyword arguments.
532
+ # request = Google::Cloud::NetworkConnectivity::V1::UpdateHubRequest.new
533
+ #
534
+ # # Call the update_hub method.
535
+ # result = client.update_hub request
536
+ #
537
+ # # The returned object is of type Gapic::Operation. You can use this
538
+ # # object to check the status of an operation, cancel it, or wait
539
+ # # for results. Here is how to block until completion:
540
+ # result.wait_until_done! timeout: 60
541
+ # if result.response?
542
+ # p result.response
543
+ # else
544
+ # puts "Error!"
545
+ # end
546
+ #
461
547
  def update_hub request, options = nil
462
548
  raise ::ArgumentError, "request must be provided" if request.nil?
463
549
 
@@ -475,9 +561,11 @@ module Google
475
561
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
476
562
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
477
563
 
478
- header_params = {
479
- "hub.name" => request.hub.name
480
- }
564
+ header_params = {}
565
+ if request.hub&.name
566
+ header_params["hub.name"] = request.hub.name
567
+ end
568
+
481
569
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
482
570
  metadata[:"x-goog-request-params"] ||= request_params_header
483
571
 
@@ -542,6 +630,28 @@ module Google
542
630
  #
543
631
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
544
632
  #
633
+ # @example Basic example
634
+ # require "google/cloud/network_connectivity/v1"
635
+ #
636
+ # # Create a client object. The client can be reused for multiple calls.
637
+ # client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
638
+ #
639
+ # # Create a request. To set request fields, pass in keyword arguments.
640
+ # request = Google::Cloud::NetworkConnectivity::V1::DeleteHubRequest.new
641
+ #
642
+ # # Call the delete_hub method.
643
+ # result = client.delete_hub request
644
+ #
645
+ # # The returned object is of type Gapic::Operation. You can use this
646
+ # # object to check the status of an operation, cancel it, or wait
647
+ # # for results. Here is how to block until completion:
648
+ # result.wait_until_done! timeout: 60
649
+ # if result.response?
650
+ # p result.response
651
+ # else
652
+ # puts "Error!"
653
+ # end
654
+ #
545
655
  def delete_hub request, options = nil
546
656
  raise ::ArgumentError, "request must be provided" if request.nil?
547
657
 
@@ -559,9 +669,11 @@ module Google
559
669
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
560
670
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
561
671
 
562
- header_params = {
563
- "name" => request.name
564
- }
672
+ header_params = {}
673
+ if request.name
674
+ header_params["name"] = request.name
675
+ end
676
+
565
677
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
566
678
  metadata[:"x-goog-request-params"] ||= request_params_header
567
679
 
@@ -619,6 +731,27 @@ module Google
619
731
  #
620
732
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
621
733
  #
734
+ # @example Basic example
735
+ # require "google/cloud/network_connectivity/v1"
736
+ #
737
+ # # Create a client object. The client can be reused for multiple calls.
738
+ # client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
739
+ #
740
+ # # Create a request. To set request fields, pass in keyword arguments.
741
+ # request = Google::Cloud::NetworkConnectivity::V1::ListSpokesRequest.new
742
+ #
743
+ # # Call the list_spokes method.
744
+ # result = client.list_spokes request
745
+ #
746
+ # # The returned object is of type Gapic::PagedEnumerable. You can
747
+ # # iterate over all elements by calling #each, and the enumerable
748
+ # # will lazily make API calls to fetch subsequent pages. Other
749
+ # # methods are also available for managing paging directly.
750
+ # result.each do |response|
751
+ # # Each element is of type ::Google::Cloud::NetworkConnectivity::V1::Spoke.
752
+ # p response
753
+ # end
754
+ #
622
755
  def list_spokes request, options = nil
623
756
  raise ::ArgumentError, "request must be provided" if request.nil?
624
757
 
@@ -636,9 +769,11 @@ module Google
636
769
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
637
770
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
638
771
 
639
- header_params = {
640
- "parent" => request.parent
641
- }
772
+ header_params = {}
773
+ if request.parent
774
+ header_params["parent"] = request.parent
775
+ end
776
+
642
777
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
643
778
  metadata[:"x-goog-request-params"] ||= request_params_header
644
779
 
@@ -688,6 +823,21 @@ module Google
688
823
  #
689
824
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
690
825
  #
826
+ # @example Basic example
827
+ # require "google/cloud/network_connectivity/v1"
828
+ #
829
+ # # Create a client object. The client can be reused for multiple calls.
830
+ # client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
831
+ #
832
+ # # Create a request. To set request fields, pass in keyword arguments.
833
+ # request = Google::Cloud::NetworkConnectivity::V1::GetSpokeRequest.new
834
+ #
835
+ # # Call the get_spoke method.
836
+ # result = client.get_spoke request
837
+ #
838
+ # # The returned object is of type Google::Cloud::NetworkConnectivity::V1::Spoke.
839
+ # p result
840
+ #
691
841
  def get_spoke request, options = nil
692
842
  raise ::ArgumentError, "request must be provided" if request.nil?
693
843
 
@@ -705,9 +855,11 @@ module Google
705
855
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
706
856
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
707
857
 
708
- header_params = {
709
- "name" => request.name
710
- }
858
+ header_params = {}
859
+ if request.name
860
+ header_params["name"] = request.name
861
+ end
862
+
711
863
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
712
864
  metadata[:"x-goog-request-params"] ||= request_params_header
713
865
 
@@ -775,6 +927,28 @@ module Google
775
927
  #
776
928
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
777
929
  #
930
+ # @example Basic example
931
+ # require "google/cloud/network_connectivity/v1"
932
+ #
933
+ # # Create a client object. The client can be reused for multiple calls.
934
+ # client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
935
+ #
936
+ # # Create a request. To set request fields, pass in keyword arguments.
937
+ # request = Google::Cloud::NetworkConnectivity::V1::CreateSpokeRequest.new
938
+ #
939
+ # # Call the create_spoke method.
940
+ # result = client.create_spoke request
941
+ #
942
+ # # The returned object is of type Gapic::Operation. You can use this
943
+ # # object to check the status of an operation, cancel it, or wait
944
+ # # for results. Here is how to block until completion:
945
+ # result.wait_until_done! timeout: 60
946
+ # if result.response?
947
+ # p result.response
948
+ # else
949
+ # puts "Error!"
950
+ # end
951
+ #
778
952
  def create_spoke request, options = nil
779
953
  raise ::ArgumentError, "request must be provided" if request.nil?
780
954
 
@@ -792,9 +966,11 @@ module Google
792
966
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
793
967
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
794
968
 
795
- header_params = {
796
- "parent" => request.parent
797
- }
969
+ header_params = {}
970
+ if request.parent
971
+ header_params["parent"] = request.parent
972
+ end
973
+
798
974
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
799
975
  metadata[:"x-goog-request-params"] ||= request_params_header
800
976
 
@@ -865,6 +1041,28 @@ module Google
865
1041
  #
866
1042
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
867
1043
  #
1044
+ # @example Basic example
1045
+ # require "google/cloud/network_connectivity/v1"
1046
+ #
1047
+ # # Create a client object. The client can be reused for multiple calls.
1048
+ # client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
1049
+ #
1050
+ # # Create a request. To set request fields, pass in keyword arguments.
1051
+ # request = Google::Cloud::NetworkConnectivity::V1::UpdateSpokeRequest.new
1052
+ #
1053
+ # # Call the update_spoke method.
1054
+ # result = client.update_spoke request
1055
+ #
1056
+ # # The returned object is of type Gapic::Operation. You can use this
1057
+ # # object to check the status of an operation, cancel it, or wait
1058
+ # # for results. Here is how to block until completion:
1059
+ # result.wait_until_done! timeout: 60
1060
+ # if result.response?
1061
+ # p result.response
1062
+ # else
1063
+ # puts "Error!"
1064
+ # end
1065
+ #
868
1066
  def update_spoke request, options = nil
869
1067
  raise ::ArgumentError, "request must be provided" if request.nil?
870
1068
 
@@ -882,9 +1080,11 @@ module Google
882
1080
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
883
1081
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
884
1082
 
885
- header_params = {
886
- "spoke.name" => request.spoke.name
887
- }
1083
+ header_params = {}
1084
+ if request.spoke&.name
1085
+ header_params["spoke.name"] = request.spoke.name
1086
+ end
1087
+
888
1088
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
889
1089
  metadata[:"x-goog-request-params"] ||= request_params_header
890
1090
 
@@ -949,6 +1149,28 @@ module Google
949
1149
  #
950
1150
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
951
1151
  #
1152
+ # @example Basic example
1153
+ # require "google/cloud/network_connectivity/v1"
1154
+ #
1155
+ # # Create a client object. The client can be reused for multiple calls.
1156
+ # client = Google::Cloud::NetworkConnectivity::V1::HubService::Client.new
1157
+ #
1158
+ # # Create a request. To set request fields, pass in keyword arguments.
1159
+ # request = Google::Cloud::NetworkConnectivity::V1::DeleteSpokeRequest.new
1160
+ #
1161
+ # # Call the delete_spoke method.
1162
+ # result = client.delete_spoke request
1163
+ #
1164
+ # # The returned object is of type Gapic::Operation. You can use this
1165
+ # # object to check the status of an operation, cancel it, or wait
1166
+ # # for results. Here is how to block until completion:
1167
+ # result.wait_until_done! timeout: 60
1168
+ # if result.response?
1169
+ # p result.response
1170
+ # else
1171
+ # puts "Error!"
1172
+ # end
1173
+ #
952
1174
  def delete_spoke request, options = nil
953
1175
  raise ::ArgumentError, "request must be provided" if request.nil?
954
1176
 
@@ -966,9 +1188,11 @@ module Google
966
1188
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
967
1189
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
968
1190
 
969
- header_params = {
970
- "name" => request.name
971
- }
1191
+ header_params = {}
1192
+ if request.name
1193
+ header_params["name"] = request.name
1194
+ end
1195
+
972
1196
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
973
1197
  metadata[:"x-goog-request-params"] ||= request_params_header
974
1198
 
@@ -143,6 +143,27 @@ module Google
143
143
  #
144
144
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
145
  #
146
+ # @example Basic example
147
+ # require "google/longrunning"
148
+ #
149
+ # # Create a client object. The client can be reused for multiple calls.
150
+ # client = Google::Longrunning::Operations::Client.new
151
+ #
152
+ # # Create a request. To set request fields, pass in keyword arguments.
153
+ # request = Google::Longrunning::ListOperationsRequest.new
154
+ #
155
+ # # Call the list_operations method.
156
+ # result = client.list_operations request
157
+ #
158
+ # # The returned object is of type Gapic::PagedEnumerable. You can
159
+ # # iterate over all elements by calling #each, and the enumerable
160
+ # # will lazily make API calls to fetch subsequent pages. Other
161
+ # # methods are also available for managing paging directly.
162
+ # result.each do |response|
163
+ # # Each element is of type ::Google::Longrunning::Operation.
164
+ # p response
165
+ # end
166
+ #
146
167
  def list_operations request, options = nil
147
168
  raise ::ArgumentError, "request must be provided" if request.nil?
148
169
 
@@ -160,9 +181,11 @@ module Google
160
181
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
161
182
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
162
183
 
163
- header_params = {
164
- "name" => request.name
165
- }
184
+ header_params = {}
185
+ if request.name
186
+ header_params["name"] = request.name
187
+ end
188
+
166
189
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
167
190
  metadata[:"x-goog-request-params"] ||= request_params_header
168
191
 
@@ -215,6 +238,28 @@ module Google
215
238
  #
216
239
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
217
240
  #
241
+ # @example Basic example
242
+ # require "google/longrunning"
243
+ #
244
+ # # Create a client object. The client can be reused for multiple calls.
245
+ # client = Google::Longrunning::Operations::Client.new
246
+ #
247
+ # # Create a request. To set request fields, pass in keyword arguments.
248
+ # request = Google::Longrunning::GetOperationRequest.new
249
+ #
250
+ # # Call the get_operation method.
251
+ # result = client.get_operation request
252
+ #
253
+ # # The returned object is of type Gapic::Operation. You can use this
254
+ # # object to check the status of an operation, cancel it, or wait
255
+ # # for results. Here is how to block until completion:
256
+ # result.wait_until_done! timeout: 60
257
+ # if result.response?
258
+ # p result.response
259
+ # else
260
+ # puts "Error!"
261
+ # end
262
+ #
218
263
  def get_operation request, options = nil
219
264
  raise ::ArgumentError, "request must be provided" if request.nil?
220
265
 
@@ -232,9 +277,11 @@ module Google
232
277
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
233
278
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
279
 
235
- header_params = {
236
- "name" => request.name
237
- }
280
+ header_params = {}
281
+ if request.name
282
+ header_params["name"] = request.name
283
+ end
284
+
238
285
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
239
286
  metadata[:"x-goog-request-params"] ||= request_params_header
240
287
 
@@ -287,6 +334,21 @@ module Google
287
334
  #
288
335
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
289
336
  #
337
+ # @example Basic example
338
+ # require "google/longrunning"
339
+ #
340
+ # # Create a client object. The client can be reused for multiple calls.
341
+ # client = Google::Longrunning::Operations::Client.new
342
+ #
343
+ # # Create a request. To set request fields, pass in keyword arguments.
344
+ # request = Google::Longrunning::DeleteOperationRequest.new
345
+ #
346
+ # # Call the delete_operation method.
347
+ # result = client.delete_operation request
348
+ #
349
+ # # The returned object is of type Google::Protobuf::Empty.
350
+ # p result
351
+ #
290
352
  def delete_operation request, options = nil
291
353
  raise ::ArgumentError, "request must be provided" if request.nil?
292
354
 
@@ -304,9 +366,11 @@ module Google
304
366
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
305
367
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
306
368
 
307
- header_params = {
308
- "name" => request.name
309
- }
369
+ header_params = {}
370
+ if request.name
371
+ header_params["name"] = request.name
372
+ end
373
+
310
374
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
311
375
  metadata[:"x-goog-request-params"] ||= request_params_header
312
376
 
@@ -364,6 +428,21 @@ module Google
364
428
  #
365
429
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
366
430
  #
431
+ # @example Basic example
432
+ # require "google/longrunning"
433
+ #
434
+ # # Create a client object. The client can be reused for multiple calls.
435
+ # client = Google::Longrunning::Operations::Client.new
436
+ #
437
+ # # Create a request. To set request fields, pass in keyword arguments.
438
+ # request = Google::Longrunning::CancelOperationRequest.new
439
+ #
440
+ # # Call the cancel_operation method.
441
+ # result = client.cancel_operation request
442
+ #
443
+ # # The returned object is of type Google::Protobuf::Empty.
444
+ # p result
445
+ #
367
446
  def cancel_operation request, options = nil
368
447
  raise ::ArgumentError, "request must be provided" if request.nil?
369
448
 
@@ -381,9 +460,11 @@ module Google
381
460
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1::VERSION
382
461
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
383
462
 
384
- header_params = {
385
- "name" => request.name
386
- }
463
+ header_params = {}
464
+ if request.name
465
+ header_params["name"] = request.name
466
+ end
467
+
387
468
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
388
469
  metadata[:"x-goog-request-params"] ||= request_params_header
389
470
 
@@ -444,6 +525,28 @@ module Google
444
525
  #
445
526
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
446
527
  #
528
+ # @example Basic example
529
+ # require "google/longrunning"
530
+ #
531
+ # # Create a client object. The client can be reused for multiple calls.
532
+ # client = Google::Longrunning::Operations::Client.new
533
+ #
534
+ # # Create a request. To set request fields, pass in keyword arguments.
535
+ # request = Google::Longrunning::WaitOperationRequest.new
536
+ #
537
+ # # Call the wait_operation method.
538
+ # result = client.wait_operation request
539
+ #
540
+ # # The returned object is of type Gapic::Operation. You can use this
541
+ # # object to check the status of an operation, cancel it, or wait
542
+ # # for results. Here is how to block until completion:
543
+ # result.wait_until_done! timeout: 60
544
+ # if result.response?
545
+ # p result.response
546
+ # else
547
+ # puts "Error!"
548
+ # end
549
+ #
447
550
  def wait_operation request, options = nil
448
551
  raise ::ArgumentError, "request must be provided" if request.nil?
449
552
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module NetworkConnectivity
23
23
  module V1
24
- VERSION = "0.1.1"
24
+ VERSION = "0.1.2"
25
25
  end
26
26
  end
27
27
  end
@@ -1,11 +1,11 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/networkconnectivity/v1/common.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/field_behavior_pb'
7
5
  require 'google/protobuf/timestamp_pb'
8
6
  require 'google/api/annotations_pb'
7
+ require 'google/protobuf'
8
+
9
9
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
10
  add_file("google/cloud/networkconnectivity/v1/common.proto", :syntax => :proto3) do
11
11
  add_message "google.cloud.networkconnectivity.v1.OperationMetadata" do
@@ -1,8 +1,6 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/cloud/networkconnectivity/v1/hub.proto
3
3
 
4
- require 'google/protobuf'
5
-
6
4
  require 'google/api/annotations_pb'
7
5
  require 'google/api/client_pb'
8
6
  require 'google/api/field_behavior_pb'
@@ -10,6 +8,8 @@ require 'google/api/resource_pb'
10
8
  require 'google/longrunning/operations_pb'
11
9
  require 'google/protobuf/field_mask_pb'
12
10
  require 'google/protobuf/timestamp_pb'
11
+ require 'google/protobuf'
12
+
13
13
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
14
  add_file("google/cloud/networkconnectivity/v1/hub.proto", :syntax => :proto3) do
15
15
  add_message "google.cloud.networkconnectivity.v1.Hub" do
@@ -29,7 +29,7 @@ module Google
29
29
  # through a simple, centralized connectivity management model.
30
30
  class Service
31
31
 
32
- include GRPC::GenericService
32
+ include ::GRPC::GenericService
33
33
 
34
34
  self.marshal_class_method = :encode
35
35
  self.unmarshal_class_method = :decode
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-network_connectivity-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-25 00:00:00.000000000 Z
11
+ date: 2021-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common