google-cloud-gke_hub-v1beta1 0.2.0 → 0.3.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: 718c4f4e7822f2854e3d0bf972e221f6ee5e25182c8c2e74cca5823e24b562d3
4
- data.tar.gz: b23faed4354600da9c06945d353a02704258459722b3632c741c7713c117b96e
3
+ metadata.gz: 752c66e3e1fc852f4d70218a4aaeed44e914c9deb55501080e740804c62f25e2
4
+ data.tar.gz: 3b070898124917d03bdacc1da951830be1b095c9cec0426cb78e3f465ac87ac4
5
5
  SHA512:
6
- metadata.gz: 2d4d122d174189c7ef42318fe7c5154fe75ed8363fa755a850716913db6ff6b4e256658c96dd13c0ab8991ec0118eeed78c95ba688c0fa45c8b4028ed7ec1050
7
- data.tar.gz: 8dcd23a1eac1744ba2757f67dc42fa8aee124aff3b804003ba2d703c3304a93bcdb6f2086f3684eb7093d69592f130cd2fcae8757cabca396260097cc8a49fc2
6
+ metadata.gz: 1c0949d61088705f1d75e7758f7bc517ad8f17a22b1ec05adfa5a66743ee0324ffe4b76967e449ae31f89213a40ffc03985b7d78de69a6d3f65ab638f7a418be
7
+ data.tar.gz: 1c14f28949897df3ed01c9f2ff0ecb9dc468ecf8b3b7acedd1444b3bef3c9c40787f418467e05cc86bde12ec873173d46e9f96efc81c97cd81fd0c8f6d43d780
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=GKE Hub V1beta1 API
2
+ --title="GKE Hub V1beta1 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::GkeHub::V1beta1::ListMembershipsRequest.new # (reques
37
37
  response = client.list_memberships request
38
38
  ```
39
39
 
40
- View the [Client Library Documentation](https://googleapis.dev/ruby/google-cloud-gke_hub-v1beta1/latest)
40
+ View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-gke_hub-v1beta1/latest)
41
41
  for class and method documentation.
42
42
 
43
43
  See also the [Product Documentation](https://cloud.google.com/anthos/clusters/docs)
@@ -69,6 +69,11 @@ 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
79
  This library is supported on Ruby 2.5+.
@@ -18,6 +18,8 @@
18
18
 
19
19
  require "google/cloud/errors"
20
20
  require "google/cloud/gkehub/v1beta1/membership_pb"
21
+ require "google/cloud/location"
22
+ require "google/iam/v1/iam_policy"
21
23
 
22
24
  module Google
23
25
  module Cloud
@@ -147,6 +149,19 @@ module Google
147
149
 
148
150
  @operations_client = Operations.new do |config|
149
151
  config.credentials = credentials
152
+ config.quota_project = @quota_project_id
153
+ config.endpoint = @config.endpoint
154
+ end
155
+
156
+ @location_client = Google::Cloud::Location::Locations::Client.new do |config|
157
+ config.credentials = credentials
158
+ config.quota_project = @quota_project_id
159
+ config.endpoint = @config.endpoint
160
+ end
161
+
162
+ @iam_policy_client = Google::Iam::V1::IAMPolicy::Client.new do |config|
163
+ config.credentials = credentials
164
+ config.quota_project = @quota_project_id
150
165
  config.endpoint = @config.endpoint
151
166
  end
152
167
 
@@ -166,6 +181,20 @@ module Google
166
181
  #
167
182
  attr_reader :operations_client
168
183
 
184
+ ##
185
+ # Get the associated client for mix-in of the Locations.
186
+ #
187
+ # @return [Google::Cloud::Location::Locations::Client]
188
+ #
189
+ attr_reader :location_client
190
+
191
+ ##
192
+ # Get the associated client for mix-in of the IAMPolicy.
193
+ #
194
+ # @return [Google::Iam::V1::IAMPolicy::Client]
195
+ #
196
+ attr_reader :iam_policy_client
197
+
169
198
  # Service calls
170
199
 
171
200
  ##
@@ -230,6 +259,27 @@ module Google
230
259
  #
231
260
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
232
261
  #
262
+ # @example Basic example
263
+ # require "google/cloud/gke_hub/v1beta1"
264
+ #
265
+ # # Create a client object. The client can be reused for multiple calls.
266
+ # client = Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.new
267
+ #
268
+ # # Create a request. To set request fields, pass in keyword arguments.
269
+ # request = Google::Cloud::GkeHub::V1beta1::ListMembershipsRequest.new
270
+ #
271
+ # # Call the list_memberships method.
272
+ # result = client.list_memberships request
273
+ #
274
+ # # The returned object is of type Gapic::PagedEnumerable. You can
275
+ # # iterate over all elements by calling #each, and the enumerable
276
+ # # will lazily make API calls to fetch subsequent pages. Other
277
+ # # methods are also available for managing paging directly.
278
+ # result.each do |response|
279
+ # # Each element is of type ::Google::Cloud::GkeHub::V1beta1::Membership.
280
+ # p response
281
+ # end
282
+ #
233
283
  def list_memberships request, options = nil
234
284
  raise ::ArgumentError, "request must be provided" if request.nil?
235
285
 
@@ -247,9 +297,11 @@ module Google
247
297
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
248
298
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
249
299
 
250
- header_params = {
251
- "parent" => request.parent
252
- }
300
+ header_params = {}
301
+ if request.parent
302
+ header_params["parent"] = request.parent
303
+ end
304
+
253
305
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
254
306
  metadata[:"x-goog-request-params"] ||= request_params_header
255
307
 
@@ -300,6 +352,21 @@ module Google
300
352
  #
301
353
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
302
354
  #
355
+ # @example Basic example
356
+ # require "google/cloud/gke_hub/v1beta1"
357
+ #
358
+ # # Create a client object. The client can be reused for multiple calls.
359
+ # client = Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.new
360
+ #
361
+ # # Create a request. To set request fields, pass in keyword arguments.
362
+ # request = Google::Cloud::GkeHub::V1beta1::GetMembershipRequest.new
363
+ #
364
+ # # Call the get_membership method.
365
+ # result = client.get_membership request
366
+ #
367
+ # # The returned object is of type Google::Cloud::GkeHub::V1beta1::Membership.
368
+ # p result
369
+ #
303
370
  def get_membership request, options = nil
304
371
  raise ::ArgumentError, "request must be provided" if request.nil?
305
372
 
@@ -317,9 +384,11 @@ module Google
317
384
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
318
385
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
319
386
 
320
- header_params = {
321
- "name" => request.name
322
- }
387
+ header_params = {}
388
+ if request.name
389
+ header_params["name"] = request.name
390
+ end
391
+
323
392
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
324
393
  metadata[:"x-goog-request-params"] ||= request_params_header
325
394
 
@@ -399,6 +468,28 @@ module Google
399
468
  #
400
469
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
401
470
  #
471
+ # @example Basic example
472
+ # require "google/cloud/gke_hub/v1beta1"
473
+ #
474
+ # # Create a client object. The client can be reused for multiple calls.
475
+ # client = Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.new
476
+ #
477
+ # # Create a request. To set request fields, pass in keyword arguments.
478
+ # request = Google::Cloud::GkeHub::V1beta1::CreateMembershipRequest.new
479
+ #
480
+ # # Call the create_membership method.
481
+ # result = client.create_membership request
482
+ #
483
+ # # The returned object is of type Gapic::Operation. You can use this
484
+ # # object to check the status of an operation, cancel it, or wait
485
+ # # for results. Here is how to block until completion:
486
+ # result.wait_until_done! timeout: 60
487
+ # if result.response?
488
+ # p result.response
489
+ # else
490
+ # puts "Error!"
491
+ # end
492
+ #
402
493
  def create_membership request, options = nil
403
494
  raise ::ArgumentError, "request must be provided" if request.nil?
404
495
 
@@ -416,9 +507,11 @@ module Google
416
507
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
417
508
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
418
509
 
419
- header_params = {
420
- "parent" => request.parent
421
- }
510
+ header_params = {}
511
+ if request.parent
512
+ header_params["parent"] = request.parent
513
+ end
514
+
422
515
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
423
516
  metadata[:"x-goog-request-params"] ||= request_params_header
424
517
 
@@ -487,6 +580,28 @@ module Google
487
580
  #
488
581
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
489
582
  #
583
+ # @example Basic example
584
+ # require "google/cloud/gke_hub/v1beta1"
585
+ #
586
+ # # Create a client object. The client can be reused for multiple calls.
587
+ # client = Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.new
588
+ #
589
+ # # Create a request. To set request fields, pass in keyword arguments.
590
+ # request = Google::Cloud::GkeHub::V1beta1::DeleteMembershipRequest.new
591
+ #
592
+ # # Call the delete_membership method.
593
+ # result = client.delete_membership request
594
+ #
595
+ # # The returned object is of type Gapic::Operation. You can use this
596
+ # # object to check the status of an operation, cancel it, or wait
597
+ # # for results. Here is how to block until completion:
598
+ # result.wait_until_done! timeout: 60
599
+ # if result.response?
600
+ # p result.response
601
+ # else
602
+ # puts "Error!"
603
+ # end
604
+ #
490
605
  def delete_membership request, options = nil
491
606
  raise ::ArgumentError, "request must be provided" if request.nil?
492
607
 
@@ -504,9 +619,11 @@ module Google
504
619
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
505
620
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
506
621
 
507
- header_params = {
508
- "name" => request.name
509
- }
622
+ header_params = {}
623
+ if request.name
624
+ header_params["name"] = request.name
625
+ end
626
+
510
627
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
511
628
  metadata[:"x-goog-request-params"] ||= request_params_header
512
629
 
@@ -583,6 +700,28 @@ module Google
583
700
  #
584
701
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
585
702
  #
703
+ # @example Basic example
704
+ # require "google/cloud/gke_hub/v1beta1"
705
+ #
706
+ # # Create a client object. The client can be reused for multiple calls.
707
+ # client = Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.new
708
+ #
709
+ # # Create a request. To set request fields, pass in keyword arguments.
710
+ # request = Google::Cloud::GkeHub::V1beta1::UpdateMembershipRequest.new
711
+ #
712
+ # # Call the update_membership method.
713
+ # result = client.update_membership request
714
+ #
715
+ # # The returned object is of type Gapic::Operation. You can use this
716
+ # # object to check the status of an operation, cancel it, or wait
717
+ # # for results. Here is how to block until completion:
718
+ # result.wait_until_done! timeout: 60
719
+ # if result.response?
720
+ # p result.response
721
+ # else
722
+ # puts "Error!"
723
+ # end
724
+ #
586
725
  def update_membership request, options = nil
587
726
  raise ::ArgumentError, "request must be provided" if request.nil?
588
727
 
@@ -600,9 +739,11 @@ module Google
600
739
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
601
740
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
602
741
 
603
- header_params = {
604
- "name" => request.name
605
- }
742
+ header_params = {}
743
+ if request.name
744
+ header_params["name"] = request.name
745
+ end
746
+
606
747
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
607
748
  metadata[:"x-goog-request-params"] ||= request_params_header
608
749
 
@@ -668,6 +809,21 @@ module Google
668
809
  #
669
810
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
670
811
  #
812
+ # @example Basic example
813
+ # require "google/cloud/gke_hub/v1beta1"
814
+ #
815
+ # # Create a client object. The client can be reused for multiple calls.
816
+ # client = Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.new
817
+ #
818
+ # # Create a request. To set request fields, pass in keyword arguments.
819
+ # request = Google::Cloud::GkeHub::V1beta1::GenerateConnectManifestRequest.new
820
+ #
821
+ # # Call the generate_connect_manifest method.
822
+ # result = client.generate_connect_manifest request
823
+ #
824
+ # # The returned object is of type Google::Cloud::GkeHub::V1beta1::GenerateConnectManifestResponse.
825
+ # p result
826
+ #
671
827
  def generate_connect_manifest request, options = nil
672
828
  raise ::ArgumentError, "request must be provided" if request.nil?
673
829
 
@@ -685,9 +841,11 @@ module Google
685
841
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
686
842
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
687
843
 
688
- header_params = {
689
- "name" => request.name
690
- }
844
+ header_params = {}
845
+ if request.name
846
+ header_params["name"] = request.name
847
+ end
848
+
691
849
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
692
850
  metadata[:"x-goog-request-params"] ||= request_params_header
693
851
 
@@ -744,6 +902,21 @@ module Google
744
902
  #
745
903
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
746
904
  #
905
+ # @example Basic example
906
+ # require "google/cloud/gke_hub/v1beta1"
907
+ #
908
+ # # Create a client object. The client can be reused for multiple calls.
909
+ # client = Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.new
910
+ #
911
+ # # Create a request. To set request fields, pass in keyword arguments.
912
+ # request = Google::Cloud::GkeHub::V1beta1::ValidateExclusivityRequest.new
913
+ #
914
+ # # Call the validate_exclusivity method.
915
+ # result = client.validate_exclusivity request
916
+ #
917
+ # # The returned object is of type Google::Cloud::GkeHub::V1beta1::ValidateExclusivityResponse.
918
+ # p result
919
+ #
747
920
  def validate_exclusivity request, options = nil
748
921
  raise ::ArgumentError, "request must be provided" if request.nil?
749
922
 
@@ -761,9 +934,11 @@ module Google
761
934
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
762
935
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
763
936
 
764
- header_params = {
765
- "parent" => request.parent
766
- }
937
+ header_params = {}
938
+ if request.parent
939
+ header_params["parent"] = request.parent
940
+ end
941
+
767
942
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
768
943
  metadata[:"x-goog-request-params"] ||= request_params_header
769
944
 
@@ -832,6 +1007,21 @@ module Google
832
1007
  #
833
1008
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
834
1009
  #
1010
+ # @example Basic example
1011
+ # require "google/cloud/gke_hub/v1beta1"
1012
+ #
1013
+ # # Create a client object. The client can be reused for multiple calls.
1014
+ # client = Google::Cloud::GkeHub::V1beta1::GkeHubMembershipService::Client.new
1015
+ #
1016
+ # # Create a request. To set request fields, pass in keyword arguments.
1017
+ # request = Google::Cloud::GkeHub::V1beta1::GenerateExclusivityManifestRequest.new
1018
+ #
1019
+ # # Call the generate_exclusivity_manifest method.
1020
+ # result = client.generate_exclusivity_manifest request
1021
+ #
1022
+ # # The returned object is of type Google::Cloud::GkeHub::V1beta1::GenerateExclusivityManifestResponse.
1023
+ # p result
1024
+ #
835
1025
  def generate_exclusivity_manifest request, options = nil
836
1026
  raise ::ArgumentError, "request must be provided" if request.nil?
837
1027
 
@@ -849,9 +1039,11 @@ module Google
849
1039
  gapic_version: ::Google::Cloud::GkeHub::V1beta1::VERSION
850
1040
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
851
1041
 
852
- header_params = {
853
- "name" => request.name
854
- }
1042
+ header_params = {}
1043
+ if request.name
1044
+ header_params["name"] = request.name
1045
+ end
1046
+
855
1047
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
856
1048
  metadata[:"x-goog-request-params"] ||= request_params_header
857
1049
 
@@ -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::GkeHub::V1beta1::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::GkeHub::V1beta1::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::GkeHub::V1beta1::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::GkeHub::V1beta1::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
 
@@ -24,6 +24,23 @@ module Google
24
24
  module GkeHubMembershipService
25
25
  # Path helper methods for the GkeHubMembershipService API.
26
26
  module Paths
27
+ ##
28
+ # Create a fully-qualified Location resource string.
29
+ #
30
+ # The resource will be in the following format:
31
+ #
32
+ # `projects/{project}/locations/{location}`
33
+ #
34
+ # @param project [String]
35
+ # @param location [String]
36
+ #
37
+ # @return [::String]
38
+ def location_path project:, location:
39
+ raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
40
+
41
+ "projects/#{project}/locations/#{location}"
42
+ end
43
+
27
44
  ##
28
45
  # Create a fully-qualified Membership resource string.
29
46
  #