google-cloud-network_connectivity-v1alpha1 0.4.3 → 0.5.0

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: b143afab68f607e313c9fc1067342aa701b424eae3a5d628da835a67a648eceb
4
- data.tar.gz: eb3275865c412a5f5233f4c89ac44af58c61a43cd369c50e4d3280fc8a0cbf6e
3
+ metadata.gz: 4ec20ebc92ecea1f12099df3377638e6a84896216198dd615eb31c0efc19714c
4
+ data.tar.gz: a30851274d1a7a1c50e2bc6b0e03ec7a4918200527be6dc463090eebf1ec9e2d
5
5
  SHA512:
6
- metadata.gz: 51053b7d589039c1769d8b290bb8a754273dd25d238ffb0924e8133c1541f52ea564b123c845595dcffc2cb75cde390e66963d33f9cff79af582b85958412b9b
7
- data.tar.gz: ee7e2aba20975198ac1bc3596cab17ad9f356ffb3d6c1dfeab2704eef9ba80c8b8adb7551a7b0effa038275101785506f0148771bcc3be5b72d57d2acaf715ac
6
+ metadata.gz: 3b32493429e97cbc489d61a816840766f29961cf71a66f2440e501cfe3197d1c1a7d8ff941aaab6a8bb4298544d17291f52d2dbfb3b77fb65fc5d2ed1207b454
7
+ data.tar.gz: 24ee960a1b67cb187e8bb3386c123563fa6c26316958031965b62d55867b2db45539b9622fdea200fa92c0ec0aa1758a2226664b6eeecb09cf47535364c0663a
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Network Connectivity V1alpha1 API
2
+ --title="Network Connectivity V1alpha1 API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -120,15 +120,6 @@ To configure your system for this, simply:
120
120
  **NOTE:** This is _not_ recommended for running in production. The Cloud SDK
121
121
  *should* only be used during development.
122
122
 
123
- [gce-how-to]: https://cloud.google.com/compute/docs/authentication#using
124
- [dev-console]: https://console.cloud.google.com/project
125
-
126
- [enable-apis]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
127
-
128
- [create-new-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account.png
129
- [create-new-service-account-existing-keys]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/create-new-service-account-existing-keys.png
130
- [reuse-service-account]: https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/reuse-service-account.png
131
-
132
123
  ## Creating a Service Account
133
124
 
134
125
  Google Cloud requires **Service Account Credentials** to
@@ -139,31 +130,22 @@ If you are not running this client within
139
130
  [Google Cloud Platform environments](#google-cloud-platform-environments), you
140
131
  need a Google Developers service account.
141
132
 
142
- 1. Visit the [Google Developers Console][dev-console].
133
+ 1. Visit the [Google Cloud Console](https://console.cloud.google.com/project).
143
134
  2. Create a new project or click on an existing project.
144
- 3. Activate the slide-out navigation tray and select **API Manager**. From
135
+ 3. Activate the menu in the upper left and select **APIs & Services**. From
145
136
  here, you will enable the APIs that your application requires.
146
137
 
147
- ![Enable the APIs that your application requires][enable-apis]
148
-
149
138
  *Note: You may need to enable billing in order to use these services.*
150
139
 
151
140
  4. Select **Credentials** from the side navigation.
152
141
 
153
- You should see a screen like one of the following.
154
-
155
- ![Create a new service account][create-new-service-account]
156
-
157
- ![Create a new service account With Existing Keys][create-new-service-account-existing-keys]
158
-
159
- Find the "Add credentials" drop down and select "Service account" to be
160
- guided through downloading a new JSON key file.
142
+ Find the "Create credentials" drop down near the top of the page, and select
143
+ "Service account" to be guided through downloading a new JSON key file.
161
144
 
162
145
  If you want to re-use an existing service account, you can easily generate a
163
- new key file. Just select the account you wish to re-use, and click "Generate
164
- new JSON key":
165
-
166
- ![Re-use an existing service account][reuse-service-account]
146
+ new key file. Just select the account you wish to re-use, click the pencil
147
+ tool on the right side to edit the service account, select the **Keys** tab,
148
+ and then select **Add Key**.
167
149
 
168
150
  The key file you download will be used by this library to authenticate API
169
151
  requests and should be stored in a secure location.
data/README.md CHANGED
@@ -37,7 +37,7 @@ request = ::Google::Cloud::NetworkConnectivity::V1alpha1::ListHubsRequest.new #
37
37
  response = client.list_hubs request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-network_connectivity-v1alpha1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-network_connectivity-v1alpha1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/network-connectivity/docs)
@@ -69,16 +69,21 @@ module GRPC
69
69
  end
70
70
  ```
71
71
 
72
+
73
+ ## Google Cloud Samples
74
+
75
+ To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
76
+
72
77
  ## Supported Ruby Versions
73
78
 
74
- This library is supported on Ruby 2.5+.
79
+ This library is supported on Ruby 2.6+.
75
80
 
76
81
  Google provides official support for Ruby versions that are actively supported
77
82
  by Ruby Core—that is, Ruby versions that are either in normal maintenance or
78
- in security maintenance, and not end of life. Currently, this means Ruby 2.5
79
- and later. Older versions of Ruby _may_ still work, but are unsupported and not
80
- recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
81
- about the Ruby support schedule.
83
+ in security maintenance, and not end of life. Older versions of Ruby _may_
84
+ still work, but are unsupported and not recommended. See
85
+ https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby
86
+ support schedule.
82
87
 
83
88
  ## Which client should I use?
84
89
 
@@ -155,6 +155,7 @@ module Google
155
155
 
156
156
  @operations_client = Operations.new do |config|
157
157
  config.credentials = credentials
158
+ config.quota_project = @quota_project_id
158
159
  config.endpoint = @config.endpoint
159
160
  end
160
161
 
@@ -213,6 +214,27 @@ module Google
213
214
  #
214
215
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
215
216
  #
217
+ # @example Basic example
218
+ # require "google/cloud/network_connectivity/v1alpha1"
219
+ #
220
+ # # Create a client object. The client can be reused for multiple calls.
221
+ # client = Google::Cloud::NetworkConnectivity::V1alpha1::HubService::Client.new
222
+ #
223
+ # # Create a request. To set request fields, pass in keyword arguments.
224
+ # request = Google::Cloud::NetworkConnectivity::V1alpha1::ListHubsRequest.new
225
+ #
226
+ # # Call the list_hubs method.
227
+ # result = client.list_hubs request
228
+ #
229
+ # # The returned object is of type Gapic::PagedEnumerable. You can
230
+ # # iterate over all elements by calling #each, and the enumerable
231
+ # # will lazily make API calls to fetch subsequent pages. Other
232
+ # # methods are also available for managing paging directly.
233
+ # result.each do |response|
234
+ # # Each element is of type ::Google::Cloud::NetworkConnectivity::V1alpha1::Hub.
235
+ # p response
236
+ # end
237
+ #
216
238
  def list_hubs request, options = nil
217
239
  raise ::ArgumentError, "request must be provided" if request.nil?
218
240
 
@@ -230,9 +252,11 @@ module Google
230
252
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1alpha1::VERSION
231
253
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
232
254
 
233
- header_params = {
234
- "parent" => request.parent
235
- }
255
+ header_params = {}
256
+ if request.parent
257
+ header_params["parent"] = request.parent
258
+ end
259
+
236
260
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
237
261
  metadata[:"x-goog-request-params"] ||= request_params_header
238
262
 
@@ -282,6 +306,21 @@ module Google
282
306
  #
283
307
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
284
308
  #
309
+ # @example Basic example
310
+ # require "google/cloud/network_connectivity/v1alpha1"
311
+ #
312
+ # # Create a client object. The client can be reused for multiple calls.
313
+ # client = Google::Cloud::NetworkConnectivity::V1alpha1::HubService::Client.new
314
+ #
315
+ # # Create a request. To set request fields, pass in keyword arguments.
316
+ # request = Google::Cloud::NetworkConnectivity::V1alpha1::GetHubRequest.new
317
+ #
318
+ # # Call the get_hub method.
319
+ # result = client.get_hub request
320
+ #
321
+ # # The returned object is of type Google::Cloud::NetworkConnectivity::V1alpha1::Hub.
322
+ # p result
323
+ #
285
324
  def get_hub request, options = nil
286
325
  raise ::ArgumentError, "request must be provided" if request.nil?
287
326
 
@@ -299,9 +338,11 @@ module Google
299
338
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1alpha1::VERSION
300
339
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
301
340
 
302
- header_params = {
303
- "name" => request.name
304
- }
341
+ header_params = {}
342
+ if request.name
343
+ header_params["name"] = request.name
344
+ end
345
+
305
346
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
306
347
  metadata[:"x-goog-request-params"] ||= request_params_header
307
348
 
@@ -368,6 +409,28 @@ module Google
368
409
  #
369
410
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
370
411
  #
412
+ # @example Basic example
413
+ # require "google/cloud/network_connectivity/v1alpha1"
414
+ #
415
+ # # Create a client object. The client can be reused for multiple calls.
416
+ # client = Google::Cloud::NetworkConnectivity::V1alpha1::HubService::Client.new
417
+ #
418
+ # # Create a request. To set request fields, pass in keyword arguments.
419
+ # request = Google::Cloud::NetworkConnectivity::V1alpha1::CreateHubRequest.new
420
+ #
421
+ # # Call the create_hub method.
422
+ # result = client.create_hub request
423
+ #
424
+ # # The returned object is of type Gapic::Operation. You can use this
425
+ # # object to check the status of an operation, cancel it, or wait
426
+ # # for results. Here is how to block until completion:
427
+ # result.wait_until_done! timeout: 60
428
+ # if result.response?
429
+ # p result.response
430
+ # else
431
+ # puts "Error!"
432
+ # end
433
+ #
371
434
  def create_hub request, options = nil
372
435
  raise ::ArgumentError, "request must be provided" if request.nil?
373
436
 
@@ -385,9 +448,11 @@ module Google
385
448
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1alpha1::VERSION
386
449
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
387
450
 
388
- header_params = {
389
- "parent" => request.parent
390
- }
451
+ header_params = {}
452
+ if request.parent
453
+ header_params["parent"] = request.parent
454
+ end
455
+
391
456
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
392
457
  metadata[:"x-goog-request-params"] ||= request_params_header
393
458
 
@@ -457,6 +522,28 @@ module Google
457
522
  #
458
523
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
459
524
  #
525
+ # @example Basic example
526
+ # require "google/cloud/network_connectivity/v1alpha1"
527
+ #
528
+ # # Create a client object. The client can be reused for multiple calls.
529
+ # client = Google::Cloud::NetworkConnectivity::V1alpha1::HubService::Client.new
530
+ #
531
+ # # Create a request. To set request fields, pass in keyword arguments.
532
+ # request = Google::Cloud::NetworkConnectivity::V1alpha1::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
+ #
460
547
  def update_hub request, options = nil
461
548
  raise ::ArgumentError, "request must be provided" if request.nil?
462
549
 
@@ -474,9 +561,11 @@ module Google
474
561
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1alpha1::VERSION
475
562
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
476
563
 
477
- header_params = {
478
- "hub.name" => request.hub.name
479
- }
564
+ header_params = {}
565
+ if request.hub&.name
566
+ header_params["hub.name"] = request.hub.name
567
+ end
568
+
480
569
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
481
570
  metadata[:"x-goog-request-params"] ||= request_params_header
482
571
 
@@ -540,6 +629,28 @@ module Google
540
629
  #
541
630
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
542
631
  #
632
+ # @example Basic example
633
+ # require "google/cloud/network_connectivity/v1alpha1"
634
+ #
635
+ # # Create a client object. The client can be reused for multiple calls.
636
+ # client = Google::Cloud::NetworkConnectivity::V1alpha1::HubService::Client.new
637
+ #
638
+ # # Create a request. To set request fields, pass in keyword arguments.
639
+ # request = Google::Cloud::NetworkConnectivity::V1alpha1::DeleteHubRequest.new
640
+ #
641
+ # # Call the delete_hub method.
642
+ # result = client.delete_hub request
643
+ #
644
+ # # The returned object is of type Gapic::Operation. You can use this
645
+ # # object to check the status of an operation, cancel it, or wait
646
+ # # for results. Here is how to block until completion:
647
+ # result.wait_until_done! timeout: 60
648
+ # if result.response?
649
+ # p result.response
650
+ # else
651
+ # puts "Error!"
652
+ # end
653
+ #
543
654
  def delete_hub request, options = nil
544
655
  raise ::ArgumentError, "request must be provided" if request.nil?
545
656
 
@@ -557,9 +668,11 @@ module Google
557
668
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1alpha1::VERSION
558
669
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
559
670
 
560
- header_params = {
561
- "name" => request.name
562
- }
671
+ header_params = {}
672
+ if request.name
673
+ header_params["name"] = request.name
674
+ end
675
+
563
676
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
564
677
  metadata[:"x-goog-request-params"] ||= request_params_header
565
678
 
@@ -617,6 +730,27 @@ module Google
617
730
  #
618
731
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
619
732
  #
733
+ # @example Basic example
734
+ # require "google/cloud/network_connectivity/v1alpha1"
735
+ #
736
+ # # Create a client object. The client can be reused for multiple calls.
737
+ # client = Google::Cloud::NetworkConnectivity::V1alpha1::HubService::Client.new
738
+ #
739
+ # # Create a request. To set request fields, pass in keyword arguments.
740
+ # request = Google::Cloud::NetworkConnectivity::V1alpha1::ListSpokesRequest.new
741
+ #
742
+ # # Call the list_spokes method.
743
+ # result = client.list_spokes request
744
+ #
745
+ # # The returned object is of type Gapic::PagedEnumerable. You can
746
+ # # iterate over all elements by calling #each, and the enumerable
747
+ # # will lazily make API calls to fetch subsequent pages. Other
748
+ # # methods are also available for managing paging directly.
749
+ # result.each do |response|
750
+ # # Each element is of type ::Google::Cloud::NetworkConnectivity::V1alpha1::Spoke.
751
+ # p response
752
+ # end
753
+ #
620
754
  def list_spokes request, options = nil
621
755
  raise ::ArgumentError, "request must be provided" if request.nil?
622
756
 
@@ -634,9 +768,11 @@ module Google
634
768
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1alpha1::VERSION
635
769
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
636
770
 
637
- header_params = {
638
- "parent" => request.parent
639
- }
771
+ header_params = {}
772
+ if request.parent
773
+ header_params["parent"] = request.parent
774
+ end
775
+
640
776
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
641
777
  metadata[:"x-goog-request-params"] ||= request_params_header
642
778
 
@@ -686,6 +822,21 @@ module Google
686
822
  #
687
823
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
688
824
  #
825
+ # @example Basic example
826
+ # require "google/cloud/network_connectivity/v1alpha1"
827
+ #
828
+ # # Create a client object. The client can be reused for multiple calls.
829
+ # client = Google::Cloud::NetworkConnectivity::V1alpha1::HubService::Client.new
830
+ #
831
+ # # Create a request. To set request fields, pass in keyword arguments.
832
+ # request = Google::Cloud::NetworkConnectivity::V1alpha1::GetSpokeRequest.new
833
+ #
834
+ # # Call the get_spoke method.
835
+ # result = client.get_spoke request
836
+ #
837
+ # # The returned object is of type Google::Cloud::NetworkConnectivity::V1alpha1::Spoke.
838
+ # p result
839
+ #
689
840
  def get_spoke request, options = nil
690
841
  raise ::ArgumentError, "request must be provided" if request.nil?
691
842
 
@@ -703,9 +854,11 @@ module Google
703
854
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1alpha1::VERSION
704
855
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
705
856
 
706
- header_params = {
707
- "name" => request.name
708
- }
857
+ header_params = {}
858
+ if request.name
859
+ header_params["name"] = request.name
860
+ end
861
+
709
862
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
710
863
  metadata[:"x-goog-request-params"] ||= request_params_header
711
864
 
@@ -772,6 +925,28 @@ module Google
772
925
  #
773
926
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
774
927
  #
928
+ # @example Basic example
929
+ # require "google/cloud/network_connectivity/v1alpha1"
930
+ #
931
+ # # Create a client object. The client can be reused for multiple calls.
932
+ # client = Google::Cloud::NetworkConnectivity::V1alpha1::HubService::Client.new
933
+ #
934
+ # # Create a request. To set request fields, pass in keyword arguments.
935
+ # request = Google::Cloud::NetworkConnectivity::V1alpha1::CreateSpokeRequest.new
936
+ #
937
+ # # Call the create_spoke method.
938
+ # result = client.create_spoke request
939
+ #
940
+ # # The returned object is of type Gapic::Operation. You can use this
941
+ # # object to check the status of an operation, cancel it, or wait
942
+ # # for results. Here is how to block until completion:
943
+ # result.wait_until_done! timeout: 60
944
+ # if result.response?
945
+ # p result.response
946
+ # else
947
+ # puts "Error!"
948
+ # end
949
+ #
775
950
  def create_spoke request, options = nil
776
951
  raise ::ArgumentError, "request must be provided" if request.nil?
777
952
 
@@ -789,9 +964,11 @@ module Google
789
964
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1alpha1::VERSION
790
965
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
791
966
 
792
- header_params = {
793
- "parent" => request.parent
794
- }
967
+ header_params = {}
968
+ if request.parent
969
+ header_params["parent"] = request.parent
970
+ end
971
+
795
972
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
796
973
  metadata[:"x-goog-request-params"] ||= request_params_header
797
974
 
@@ -861,6 +1038,28 @@ module Google
861
1038
  #
862
1039
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
863
1040
  #
1041
+ # @example Basic example
1042
+ # require "google/cloud/network_connectivity/v1alpha1"
1043
+ #
1044
+ # # Create a client object. The client can be reused for multiple calls.
1045
+ # client = Google::Cloud::NetworkConnectivity::V1alpha1::HubService::Client.new
1046
+ #
1047
+ # # Create a request. To set request fields, pass in keyword arguments.
1048
+ # request = Google::Cloud::NetworkConnectivity::V1alpha1::UpdateSpokeRequest.new
1049
+ #
1050
+ # # Call the update_spoke method.
1051
+ # result = client.update_spoke request
1052
+ #
1053
+ # # The returned object is of type Gapic::Operation. You can use this
1054
+ # # object to check the status of an operation, cancel it, or wait
1055
+ # # for results. Here is how to block until completion:
1056
+ # result.wait_until_done! timeout: 60
1057
+ # if result.response?
1058
+ # p result.response
1059
+ # else
1060
+ # puts "Error!"
1061
+ # end
1062
+ #
864
1063
  def update_spoke request, options = nil
865
1064
  raise ::ArgumentError, "request must be provided" if request.nil?
866
1065
 
@@ -878,9 +1077,11 @@ module Google
878
1077
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1alpha1::VERSION
879
1078
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
880
1079
 
881
- header_params = {
882
- "spoke.name" => request.spoke.name
883
- }
1080
+ header_params = {}
1081
+ if request.spoke&.name
1082
+ header_params["spoke.name"] = request.spoke.name
1083
+ end
1084
+
884
1085
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
885
1086
  metadata[:"x-goog-request-params"] ||= request_params_header
886
1087
 
@@ -944,6 +1145,28 @@ module Google
944
1145
  #
945
1146
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
946
1147
  #
1148
+ # @example Basic example
1149
+ # require "google/cloud/network_connectivity/v1alpha1"
1150
+ #
1151
+ # # Create a client object. The client can be reused for multiple calls.
1152
+ # client = Google::Cloud::NetworkConnectivity::V1alpha1::HubService::Client.new
1153
+ #
1154
+ # # Create a request. To set request fields, pass in keyword arguments.
1155
+ # request = Google::Cloud::NetworkConnectivity::V1alpha1::DeleteSpokeRequest.new
1156
+ #
1157
+ # # Call the delete_spoke method.
1158
+ # result = client.delete_spoke request
1159
+ #
1160
+ # # The returned object is of type Gapic::Operation. You can use this
1161
+ # # object to check the status of an operation, cancel it, or wait
1162
+ # # for results. Here is how to block until completion:
1163
+ # result.wait_until_done! timeout: 60
1164
+ # if result.response?
1165
+ # p result.response
1166
+ # else
1167
+ # puts "Error!"
1168
+ # end
1169
+ #
947
1170
  def delete_spoke request, options = nil
948
1171
  raise ::ArgumentError, "request must be provided" if request.nil?
949
1172
 
@@ -961,9 +1184,11 @@ module Google
961
1184
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1alpha1::VERSION
962
1185
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
963
1186
 
964
- header_params = {
965
- "name" => request.name
966
- }
1187
+ header_params = {}
1188
+ if request.name
1189
+ header_params["name"] = request.name
1190
+ end
1191
+
967
1192
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
968
1193
  metadata[:"x-goog-request-params"] ||= request_params_header
969
1194
 
@@ -95,6 +95,9 @@ module Google
95
95
  channel_args: @config.channel_args,
96
96
  interceptors: @config.interceptors
97
97
  )
98
+
99
+ # Used by an LRO wrapper for some methods of this service
100
+ @operations_client = self
98
101
  end
99
102
 
100
103
  # Service calls
@@ -143,6 +146,27 @@ module Google
143
146
  #
144
147
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
145
148
  #
149
+ # @example Basic example
150
+ # require "google/longrunning"
151
+ #
152
+ # # Create a client object. The client can be reused for multiple calls.
153
+ # client = Google::Longrunning::Operations::Client.new
154
+ #
155
+ # # Create a request. To set request fields, pass in keyword arguments.
156
+ # request = Google::Longrunning::ListOperationsRequest.new
157
+ #
158
+ # # Call the list_operations method.
159
+ # result = client.list_operations request
160
+ #
161
+ # # The returned object is of type Gapic::PagedEnumerable. You can
162
+ # # iterate over all elements by calling #each, and the enumerable
163
+ # # will lazily make API calls to fetch subsequent pages. Other
164
+ # # methods are also available for managing paging directly.
165
+ # result.each do |response|
166
+ # # Each element is of type ::Google::Longrunning::Operation.
167
+ # p response
168
+ # end
169
+ #
146
170
  def list_operations request, options = nil
147
171
  raise ::ArgumentError, "request must be provided" if request.nil?
148
172
 
@@ -160,9 +184,11 @@ module Google
160
184
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1alpha1::VERSION
161
185
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
162
186
 
163
- header_params = {
164
- "name" => request.name
165
- }
187
+ header_params = {}
188
+ if request.name
189
+ header_params["name"] = request.name
190
+ end
191
+
166
192
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
167
193
  metadata[:"x-goog-request-params"] ||= request_params_header
168
194
 
@@ -215,6 +241,28 @@ module Google
215
241
  #
216
242
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
217
243
  #
244
+ # @example Basic example
245
+ # require "google/longrunning"
246
+ #
247
+ # # Create a client object. The client can be reused for multiple calls.
248
+ # client = Google::Longrunning::Operations::Client.new
249
+ #
250
+ # # Create a request. To set request fields, pass in keyword arguments.
251
+ # request = Google::Longrunning::GetOperationRequest.new
252
+ #
253
+ # # Call the get_operation method.
254
+ # result = client.get_operation request
255
+ #
256
+ # # The returned object is of type Gapic::Operation. You can use this
257
+ # # object to check the status of an operation, cancel it, or wait
258
+ # # for results. Here is how to block until completion:
259
+ # result.wait_until_done! timeout: 60
260
+ # if result.response?
261
+ # p result.response
262
+ # else
263
+ # puts "Error!"
264
+ # end
265
+ #
218
266
  def get_operation request, options = nil
219
267
  raise ::ArgumentError, "request must be provided" if request.nil?
220
268
 
@@ -232,9 +280,11 @@ module Google
232
280
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1alpha1::VERSION
233
281
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
234
282
 
235
- header_params = {
236
- "name" => request.name
237
- }
283
+ header_params = {}
284
+ if request.name
285
+ header_params["name"] = request.name
286
+ end
287
+
238
288
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
239
289
  metadata[:"x-goog-request-params"] ||= request_params_header
240
290
 
@@ -287,6 +337,21 @@ module Google
287
337
  #
288
338
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
289
339
  #
340
+ # @example Basic example
341
+ # require "google/longrunning"
342
+ #
343
+ # # Create a client object. The client can be reused for multiple calls.
344
+ # client = Google::Longrunning::Operations::Client.new
345
+ #
346
+ # # Create a request. To set request fields, pass in keyword arguments.
347
+ # request = Google::Longrunning::DeleteOperationRequest.new
348
+ #
349
+ # # Call the delete_operation method.
350
+ # result = client.delete_operation request
351
+ #
352
+ # # The returned object is of type Google::Protobuf::Empty.
353
+ # p result
354
+ #
290
355
  def delete_operation request, options = nil
291
356
  raise ::ArgumentError, "request must be provided" if request.nil?
292
357
 
@@ -304,9 +369,11 @@ module Google
304
369
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1alpha1::VERSION
305
370
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
306
371
 
307
- header_params = {
308
- "name" => request.name
309
- }
372
+ header_params = {}
373
+ if request.name
374
+ header_params["name"] = request.name
375
+ end
376
+
310
377
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
311
378
  metadata[:"x-goog-request-params"] ||= request_params_header
312
379
 
@@ -364,6 +431,21 @@ module Google
364
431
  #
365
432
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
366
433
  #
434
+ # @example Basic example
435
+ # require "google/longrunning"
436
+ #
437
+ # # Create a client object. The client can be reused for multiple calls.
438
+ # client = Google::Longrunning::Operations::Client.new
439
+ #
440
+ # # Create a request. To set request fields, pass in keyword arguments.
441
+ # request = Google::Longrunning::CancelOperationRequest.new
442
+ #
443
+ # # Call the cancel_operation method.
444
+ # result = client.cancel_operation request
445
+ #
446
+ # # The returned object is of type Google::Protobuf::Empty.
447
+ # p result
448
+ #
367
449
  def cancel_operation request, options = nil
368
450
  raise ::ArgumentError, "request must be provided" if request.nil?
369
451
 
@@ -381,9 +463,11 @@ module Google
381
463
  gapic_version: ::Google::Cloud::NetworkConnectivity::V1alpha1::VERSION
382
464
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
383
465
 
384
- header_params = {
385
- "name" => request.name
386
- }
466
+ header_params = {}
467
+ if request.name
468
+ header_params["name"] = request.name
469
+ end
470
+
387
471
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
388
472
  metadata[:"x-goog-request-params"] ||= request_params_header
389
473
 
@@ -444,6 +528,28 @@ module Google
444
528
  #
445
529
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
446
530
  #
531
+ # @example Basic example
532
+ # require "google/longrunning"
533
+ #
534
+ # # Create a client object. The client can be reused for multiple calls.
535
+ # client = Google::Longrunning::Operations::Client.new
536
+ #
537
+ # # Create a request. To set request fields, pass in keyword arguments.
538
+ # request = Google::Longrunning::WaitOperationRequest.new
539
+ #
540
+ # # Call the wait_operation method.
541
+ # result = client.wait_operation request
542
+ #
543
+ # # The returned object is of type Gapic::Operation. You can use this
544
+ # # object to check the status of an operation, cancel it, or wait
545
+ # # for results. Here is how to block until completion:
546
+ # result.wait_until_done! timeout: 60
547
+ # if result.response?
548
+ # p result.response
549
+ # else
550
+ # puts "Error!"
551
+ # end
552
+ #
447
553
  def wait_operation request, options = nil
448
554
  raise ::ArgumentError, "request must be provided" if request.nil?
449
555
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module NetworkConnectivity
23
23
  module V1alpha1
24
- VERSION = "0.4.3"
24
+ VERSION = "0.5.0"
25
25
  end
26
26
  end
27
27
  end
@@ -25,6 +25,8 @@ module Google
25
25
  ##
26
26
  # To load this package, including all its services, and instantiate a client:
27
27
  #
28
+ # @example
29
+ #
28
30
  # require "google/cloud/network_connectivity/v1alpha1"
29
31
  # client = ::Google::Cloud::NetworkConnectivity::V1alpha1::HubService::Client.new
30
32
  #
@@ -6,6 +6,7 @@ require 'google/protobuf'
6
6
  require 'google/api/field_behavior_pb'
7
7
  require 'google/protobuf/timestamp_pb'
8
8
  require 'google/api/annotations_pb'
9
+
9
10
  Google::Protobuf::DescriptorPool.generated_pool.build do
10
11
  add_file("google/cloud/networkconnectivity/v1alpha1/common.proto", :syntax => :proto3) do
11
12
  add_message "google.cloud.networkconnectivity.v1alpha1.OperationMetadata" do
@@ -10,6 +10,7 @@ require 'google/api/resource_pb'
10
10
  require 'google/longrunning/operations_pb'
11
11
  require 'google/protobuf/field_mask_pb'
12
12
  require 'google/protobuf/timestamp_pb'
13
+
13
14
  Google::Protobuf::DescriptorPool.generated_pool.build do
14
15
  add_file("google/cloud/networkconnectivity/v1alpha1/hub.proto", :syntax => :proto3) do
15
16
  add_message "google.cloud.networkconnectivity.v1alpha1.Hub" do
@@ -30,7 +30,7 @@ module Google
30
30
  # model.
31
31
  class Service
32
32
 
33
- include GRPC::GenericService
33
+ include ::GRPC::GenericService
34
34
 
35
35
  self.marshal_class_method = :encode
36
36
  self.unmarshal_class_method = :decode
@@ -33,11 +33,7 @@ module Google
33
33
  # // For Kubernetes resources, the format is {api group}/{kind}.
34
34
  # option (google.api.resource) = {
35
35
  # type: "pubsub.googleapis.com/Topic"
36
- # name_descriptor: {
37
- # pattern: "projects/{project}/topics/{topic}"
38
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
39
- # parent_name_extractor: "projects/{project}"
40
- # }
36
+ # pattern: "projects/{project}/topics/{topic}"
41
37
  # };
42
38
  # }
43
39
  #
@@ -45,10 +41,7 @@ module Google
45
41
  #
46
42
  # resources:
47
43
  # - type: "pubsub.googleapis.com/Topic"
48
- # name_descriptor:
49
- # - pattern: "projects/{project}/topics/{topic}"
50
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
51
- # parent_name_extractor: "projects/{project}"
44
+ # pattern: "projects/{project}/topics/{topic}"
52
45
  #
53
46
  # Sometimes, resources have multiple patterns, typically because they can
54
47
  # live under multiple parents.
@@ -58,26 +51,10 @@ module Google
58
51
  # message LogEntry {
59
52
  # option (google.api.resource) = {
60
53
  # type: "logging.googleapis.com/LogEntry"
61
- # name_descriptor: {
62
- # pattern: "projects/{project}/logs/{log}"
63
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
64
- # parent_name_extractor: "projects/{project}"
65
- # }
66
- # name_descriptor: {
67
- # pattern: "folders/{folder}/logs/{log}"
68
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
69
- # parent_name_extractor: "folders/{folder}"
70
- # }
71
- # name_descriptor: {
72
- # pattern: "organizations/{organization}/logs/{log}"
73
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
74
- # parent_name_extractor: "organizations/{organization}"
75
- # }
76
- # name_descriptor: {
77
- # pattern: "billingAccounts/{billing_account}/logs/{log}"
78
- # parent_type: "billing.googleapis.com/BillingAccount"
79
- # parent_name_extractor: "billingAccounts/{billing_account}"
80
- # }
54
+ # pattern: "projects/{project}/logs/{log}"
55
+ # pattern: "folders/{folder}/logs/{log}"
56
+ # pattern: "organizations/{organization}/logs/{log}"
57
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
81
58
  # };
82
59
  # }
83
60
  #
@@ -85,48 +62,10 @@ module Google
85
62
  #
86
63
  # resources:
87
64
  # - type: 'logging.googleapis.com/LogEntry'
88
- # name_descriptor:
89
- # - pattern: "projects/{project}/logs/{log}"
90
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
91
- # parent_name_extractor: "projects/{project}"
92
- # - pattern: "folders/{folder}/logs/{log}"
93
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
94
- # parent_name_extractor: "folders/{folder}"
95
- # - pattern: "organizations/{organization}/logs/{log}"
96
- # parent_type: "cloudresourcemanager.googleapis.com/Organization"
97
- # parent_name_extractor: "organizations/{organization}"
98
- # - pattern: "billingAccounts/{billing_account}/logs/{log}"
99
- # parent_type: "billing.googleapis.com/BillingAccount"
100
- # parent_name_extractor: "billingAccounts/{billing_account}"
101
- #
102
- # For flexible resources, the resource name doesn't contain parent names, but
103
- # the resource itself has parents for policy evaluation.
104
- #
105
- # Example:
106
- #
107
- # message Shelf {
108
- # option (google.api.resource) = {
109
- # type: "library.googleapis.com/Shelf"
110
- # name_descriptor: {
111
- # pattern: "shelves/{shelf}"
112
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
113
- # }
114
- # name_descriptor: {
115
- # pattern: "shelves/{shelf}"
116
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
117
- # }
118
- # };
119
- # }
120
- #
121
- # The ResourceDescriptor Yaml config will look like:
122
- #
123
- # resources:
124
- # - type: 'library.googleapis.com/Shelf'
125
- # name_descriptor:
126
- # - pattern: "shelves/{shelf}"
127
- # parent_type: "cloudresourcemanager.googleapis.com/Project"
128
- # - pattern: "shelves/{shelf}"
129
- # parent_type: "cloudresourcemanager.googleapis.com/Folder"
65
+ # pattern: "projects/{project}/logs/{log}"
66
+ # pattern: "folders/{folder}/logs/{log}"
67
+ # pattern: "organizations/{organization}/logs/{log}"
68
+ # pattern: "billingAccounts/{billing_account}/logs/{log}"
130
69
  # @!attribute [rw] type
131
70
  # @return [::String]
132
71
  # The resource type. It must be in the format of
@@ -44,7 +44,7 @@ module Google
44
44
  # foo = any.unpack(Foo.class);
45
45
  # }
46
46
  #
47
- # Example 3: Pack and unpack a message in Python.
47
+ # Example 3: Pack and unpack a message in Python.
48
48
  #
49
49
  # foo = Foo(...)
50
50
  # any = Any()
@@ -54,7 +54,7 @@ module Google
54
54
  # any.Unpack(foo)
55
55
  # ...
56
56
  #
57
- # Example 4: Pack and unpack a message in Go
57
+ # Example 4: Pack and unpack a message in Go
58
58
  #
59
59
  # foo := &pb.Foo{...}
60
60
  # any, err := anypb.New(foo)
@@ -75,7 +75,7 @@ module Google
75
75
  #
76
76
  #
77
77
  # JSON
78
- # ====
78
+ #
79
79
  # The JSON representation of an `Any` value uses the regular
80
80
  # representation of the deserialized, embedded message, with an
81
81
  # additional field `@type` which contains the type URL. Example:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-network_connectivity-v1alpha1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.5.0
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-11 00:00:00.000000000 Z
11
+ date: 2022-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common
@@ -16,7 +16,7 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.7'
19
+ version: '0.10'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.a
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '0.7'
29
+ version: '0.10'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -50,28 +50,28 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 1.25.1
53
+ version: 1.26.1
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.25.1
60
+ version: 1.26.1
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: minitest
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '5.14'
67
+ version: '5.16'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '5.14'
74
+ version: '5.16'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: minitest-focus
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -106,14 +106,14 @@ dependencies:
106
106
  requirements:
107
107
  - - ">="
108
108
  - !ruby/object:Gem::Version
109
- version: '12.0'
109
+ version: '13.0'
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - ">="
115
115
  - !ruby/object:Gem::Version
116
- version: '12.0'
116
+ version: '13.0'
117
117
  - !ruby/object:Gem::Dependency
118
118
  name: redcarpet
119
119
  requirement: !ruby/object:Gem::Requirement
@@ -206,14 +206,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
206
206
  requirements:
207
207
  - - ">="
208
208
  - !ruby/object:Gem::Version
209
- version: '2.5'
209
+ version: '2.6'
210
210
  required_rubygems_version: !ruby/object:Gem::Requirement
211
211
  requirements:
212
212
  - - ">="
213
213
  - !ruby/object:Gem::Version
214
214
  version: '0'
215
215
  requirements: []
216
- rubygems_version: 3.2.17
216
+ rubygems_version: 3.3.14
217
217
  signing_key:
218
218
  specification_version: 4
219
219
  summary: API Client library for the Network Connectivity V1alpha1 API