google-iam-v1beta 0.3.2 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 799a7234ec60e0940e27272a92e46fd689742c1ab7412191ca875f7a1c06240d
4
- data.tar.gz: 41ee2dea67dca9ebc86cb36e819256223a5bada5d7ef6ea58fdd766e7613e42d
3
+ metadata.gz: 077af2de59b6ce1930052bf72de3ae09cd050ebfcb774db6f48fa04dfaaae508
4
+ data.tar.gz: 6869d511ee31a78973f29605cd6be1c9b2de123e1c286a89f458842e9b2ebf0a
5
5
  SHA512:
6
- metadata.gz: c42496ee34502c70801bd283f9c881bdaa64bca353f14c2f08a5f7410c26ac40170b14ab25ca447929b023a883671d0e3d2396b87015f6df5bbcbbbf27a24fc1
7
- data.tar.gz: 8e2dda5fc8724bd48a7504ac80c5dd0a74dd15bce2bcc479c2bc301aed7de541c321fa093b2d9e065a97385554db5eade330570721b69ebbbb49ad5449ade484
6
+ metadata.gz: 6f46223b3dffb166fcc7dc7d88627ccd8020fc42601119f7b887fbf84635f1141a5368d2cf15d6731670b4dc6b9cb5950a57573026754878dce3748e6930a6ed
7
+ data.tar.gz: c735037015b287f028abb02b152099f81014c073d6a4845c53b7b4651d544ce690103159276096c6edfaece1108543f71c66bf49e0c97a713ec44f1682a609b3
data/.yardopts CHANGED
@@ -1,5 +1,5 @@
1
1
  --no-private
2
- --title=Google IAM V1beta API
2
+ --title="Google IAM V1beta API"
3
3
  --exclude _pb\.rb$
4
4
  --markup markdown
5
5
  --markup-provider redcarpet
data/AUTHENTICATION.md CHANGED
@@ -82,8 +82,8 @@ client = ::Google::Iam::V1beta::WorkloadIdentityPools::Client.new
82
82
 
83
83
  ### Configuration
84
84
 
85
- The **Credentials JSON** can be configured instead of placing them in
86
- environment variables. Either on an individual client initialization:
85
+ The path to the **Credentials JSON** file can be configured instead of storing
86
+ it in an environment variable. Either on an individual client initialization:
87
87
 
88
88
  ```ruby
89
89
  require "google/iam/v1beta"
@@ -93,7 +93,7 @@ client = ::Google::Iam::V1beta::WorkloadIdentityPools::Client.new do |config|
93
93
  end
94
94
  ```
95
95
 
96
- Or configured globally for all clients:
96
+ Or globally for all clients:
97
97
 
98
98
  ```ruby
99
99
  require "google/iam/v1beta"
@@ -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.
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Iam
22
22
  module V1beta
23
- VERSION = "0.3.2"
23
+ VERSION = "0.3.6"
24
24
  end
25
25
  end
26
26
  end
@@ -1,14 +1,14 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
2
  # source: google/iam/v1beta/workload_identity_pool.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'
9
7
  require 'google/api/resource_pb'
10
8
  require 'google/longrunning/operations_pb'
11
9
  require 'google/protobuf/field_mask_pb'
10
+ require 'google/protobuf'
11
+
12
12
  Google::Protobuf::DescriptorPool.generated_pool.build do
13
13
  add_file("google/iam/v1beta/workload_identity_pool.proto", :syntax => :proto3) do
14
14
  add_message "google.iam.v1beta.WorkloadIdentityPool" do
@@ -26,7 +26,7 @@ module Google
26
26
  # Manages WorkloadIdentityPools.
27
27
  class Service
28
28
 
29
- include GRPC::GenericService
29
+ include ::GRPC::GenericService
30
30
 
31
31
  self.marshal_class_method = :encode
32
32
  self.unmarshal_class_method = :decode
@@ -40,13 +40,12 @@ module Google
40
40
  # See {::Google::Iam::V1beta::WorkloadIdentityPools::Client::Configuration}
41
41
  # for a description of the configuration fields.
42
42
  #
43
- # ## Example
43
+ # @example
44
44
  #
45
- # To modify the configuration for all WorkloadIdentityPools clients:
46
- #
47
- # ::Google::Iam::V1beta::WorkloadIdentityPools::Client.configure do |config|
48
- # config.timeout = 10.0
49
- # end
45
+ # # Modify the configuration for all WorkloadIdentityPools clients
46
+ # ::Google::Iam::V1beta::WorkloadIdentityPools::Client.configure do |config|
47
+ # config.timeout = 10.0
48
+ # end
50
49
  #
51
50
  # @yield [config] Configure the Client client.
52
51
  # @yieldparam config [Client::Configuration]
@@ -153,19 +152,15 @@ module Google
153
152
  ##
154
153
  # Create a new WorkloadIdentityPools client object.
155
154
  #
156
- # ## Examples
157
- #
158
- # To create a new WorkloadIdentityPools client with the default
159
- # configuration:
155
+ # @example
160
156
  #
161
- # client = ::Google::Iam::V1beta::WorkloadIdentityPools::Client.new
157
+ # # Create a client using the default configuration
158
+ # client = ::Google::Iam::V1beta::WorkloadIdentityPools::Client.new
162
159
  #
163
- # To create a new WorkloadIdentityPools client with a custom
164
- # configuration:
165
- #
166
- # client = ::Google::Iam::V1beta::WorkloadIdentityPools::Client.new do |config|
167
- # config.timeout = 10.0
168
- # end
160
+ # # Create a client using a custom configuration
161
+ # client = ::Google::Iam::V1beta::WorkloadIdentityPools::Client.new do |config|
162
+ # config.timeout = 10.0
163
+ # end
169
164
  #
170
165
  # @yield [config] Configure the WorkloadIdentityPools client.
171
166
  # @yieldparam config [Client::Configuration]
@@ -185,10 +180,9 @@ module Google
185
180
 
186
181
  # Create credentials
187
182
  credentials = @config.credentials
188
- # Use self-signed JWT if the scope and endpoint are unchanged from default,
183
+ # Use self-signed JWT if the endpoint is unchanged from default,
189
184
  # but only if the default endpoint does not have a region prefix.
190
- enable_self_signed_jwt = @config.scope == Client.configure.scope &&
191
- @config.endpoint == Client.configure.endpoint &&
185
+ enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
192
186
  !@config.endpoint.split(".").first.include?("-")
193
187
  credentials ||= Credentials.default scope: @config.scope,
194
188
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -200,6 +194,7 @@ module Google
200
194
 
201
195
  @operations_client = Operations.new do |config|
202
196
  config.credentials = credentials
197
+ config.quota_project = @quota_project_id
203
198
  config.endpoint = @config.endpoint
204
199
  end
205
200
 
@@ -262,6 +257,27 @@ module Google
262
257
  #
263
258
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
264
259
  #
260
+ # @example Basic example
261
+ # require "google/iam/v1beta"
262
+ #
263
+ # # Create a client object. The client can be reused for multiple calls.
264
+ # client = Google::Iam::V1beta::WorkloadIdentityPools::Client.new
265
+ #
266
+ # # Create a request. To set request fields, pass in keyword arguments.
267
+ # request = Google::Iam::V1beta::ListWorkloadIdentityPoolsRequest.new
268
+ #
269
+ # # Call the list_workload_identity_pools method.
270
+ # result = client.list_workload_identity_pools request
271
+ #
272
+ # # The returned object is of type Gapic::PagedEnumerable. You can
273
+ # # iterate over all elements by calling #each, and the enumerable
274
+ # # will lazily make API calls to fetch subsequent pages. Other
275
+ # # methods are also available for managing paging directly.
276
+ # result.each do |response|
277
+ # # Each element is of type ::Google::Iam::V1beta::WorkloadIdentityPool.
278
+ # p response
279
+ # end
280
+ #
265
281
  def list_workload_identity_pools request, options = nil
266
282
  raise ::ArgumentError, "request must be provided" if request.nil?
267
283
 
@@ -279,16 +295,20 @@ module Google
279
295
  gapic_version: ::Google::Iam::V1beta::VERSION
280
296
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
281
297
 
282
- header_params = {
283
- "parent" => request.parent
284
- }
298
+ header_params = {}
299
+ if request.parent
300
+ header_params["parent"] = request.parent
301
+ end
302
+
285
303
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
286
304
  metadata[:"x-goog-request-params"] ||= request_params_header
287
305
 
288
306
  options.apply_defaults timeout: @config.rpcs.list_workload_identity_pools.timeout,
289
307
  metadata: metadata,
290
308
  retry_policy: @config.rpcs.list_workload_identity_pools.retry_policy
291
- options.apply_defaults metadata: @config.metadata,
309
+
310
+ options.apply_defaults timeout: @config.timeout,
311
+ metadata: @config.metadata,
292
312
  retry_policy: @config.retry_policy
293
313
 
294
314
  @workload_identity_pools_stub.call_rpc :list_workload_identity_pools, request, options: options do |response, operation|
@@ -330,6 +350,21 @@ module Google
330
350
  #
331
351
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
332
352
  #
353
+ # @example Basic example
354
+ # require "google/iam/v1beta"
355
+ #
356
+ # # Create a client object. The client can be reused for multiple calls.
357
+ # client = Google::Iam::V1beta::WorkloadIdentityPools::Client.new
358
+ #
359
+ # # Create a request. To set request fields, pass in keyword arguments.
360
+ # request = Google::Iam::V1beta::GetWorkloadIdentityPoolRequest.new
361
+ #
362
+ # # Call the get_workload_identity_pool method.
363
+ # result = client.get_workload_identity_pool request
364
+ #
365
+ # # The returned object is of type Google::Iam::V1beta::WorkloadIdentityPool.
366
+ # p result
367
+ #
333
368
  def get_workload_identity_pool request, options = nil
334
369
  raise ::ArgumentError, "request must be provided" if request.nil?
335
370
 
@@ -347,16 +382,20 @@ module Google
347
382
  gapic_version: ::Google::Iam::V1beta::VERSION
348
383
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
349
384
 
350
- header_params = {
351
- "name" => request.name
352
- }
385
+ header_params = {}
386
+ if request.name
387
+ header_params["name"] = request.name
388
+ end
389
+
353
390
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
354
391
  metadata[:"x-goog-request-params"] ||= request_params_header
355
392
 
356
393
  options.apply_defaults timeout: @config.rpcs.get_workload_identity_pool.timeout,
357
394
  metadata: metadata,
358
395
  retry_policy: @config.rpcs.get_workload_identity_pool.retry_policy
359
- options.apply_defaults metadata: @config.metadata,
396
+
397
+ options.apply_defaults timeout: @config.timeout,
398
+ metadata: @config.metadata,
360
399
  retry_policy: @config.retry_policy
361
400
 
362
401
  @workload_identity_pools_stub.call_rpc :get_workload_identity_pool, request, options: options do |response, operation|
@@ -407,6 +446,28 @@ module Google
407
446
  #
408
447
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
409
448
  #
449
+ # @example Basic example
450
+ # require "google/iam/v1beta"
451
+ #
452
+ # # Create a client object. The client can be reused for multiple calls.
453
+ # client = Google::Iam::V1beta::WorkloadIdentityPools::Client.new
454
+ #
455
+ # # Create a request. To set request fields, pass in keyword arguments.
456
+ # request = Google::Iam::V1beta::CreateWorkloadIdentityPoolRequest.new
457
+ #
458
+ # # Call the create_workload_identity_pool method.
459
+ # result = client.create_workload_identity_pool request
460
+ #
461
+ # # The returned object is of type Gapic::Operation. You can use this
462
+ # # object to check the status of an operation, cancel it, or wait
463
+ # # for results. Here is how to block until completion:
464
+ # result.wait_until_done! timeout: 60
465
+ # if result.response?
466
+ # p result.response
467
+ # else
468
+ # puts "Error!"
469
+ # end
470
+ #
410
471
  def create_workload_identity_pool request, options = nil
411
472
  raise ::ArgumentError, "request must be provided" if request.nil?
412
473
 
@@ -424,16 +485,20 @@ module Google
424
485
  gapic_version: ::Google::Iam::V1beta::VERSION
425
486
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
426
487
 
427
- header_params = {
428
- "parent" => request.parent
429
- }
488
+ header_params = {}
489
+ if request.parent
490
+ header_params["parent"] = request.parent
491
+ end
492
+
430
493
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
431
494
  metadata[:"x-goog-request-params"] ||= request_params_header
432
495
 
433
496
  options.apply_defaults timeout: @config.rpcs.create_workload_identity_pool.timeout,
434
497
  metadata: metadata,
435
498
  retry_policy: @config.rpcs.create_workload_identity_pool.retry_policy
436
- options.apply_defaults metadata: @config.metadata,
499
+
500
+ options.apply_defaults timeout: @config.timeout,
501
+ metadata: @config.metadata,
437
502
  retry_policy: @config.retry_policy
438
503
 
439
504
  @workload_identity_pools_stub.call_rpc :create_workload_identity_pool, request, options: options do |response, operation|
@@ -477,6 +542,28 @@ module Google
477
542
  #
478
543
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
479
544
  #
545
+ # @example Basic example
546
+ # require "google/iam/v1beta"
547
+ #
548
+ # # Create a client object. The client can be reused for multiple calls.
549
+ # client = Google::Iam::V1beta::WorkloadIdentityPools::Client.new
550
+ #
551
+ # # Create a request. To set request fields, pass in keyword arguments.
552
+ # request = Google::Iam::V1beta::UpdateWorkloadIdentityPoolRequest.new
553
+ #
554
+ # # Call the update_workload_identity_pool method.
555
+ # result = client.update_workload_identity_pool request
556
+ #
557
+ # # The returned object is of type Gapic::Operation. You can use this
558
+ # # object to check the status of an operation, cancel it, or wait
559
+ # # for results. Here is how to block until completion:
560
+ # result.wait_until_done! timeout: 60
561
+ # if result.response?
562
+ # p result.response
563
+ # else
564
+ # puts "Error!"
565
+ # end
566
+ #
480
567
  def update_workload_identity_pool request, options = nil
481
568
  raise ::ArgumentError, "request must be provided" if request.nil?
482
569
 
@@ -494,16 +581,20 @@ module Google
494
581
  gapic_version: ::Google::Iam::V1beta::VERSION
495
582
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
496
583
 
497
- header_params = {
498
- "workload_identity_pool.name" => request.workload_identity_pool.name
499
- }
584
+ header_params = {}
585
+ if request.workload_identity_pool&.name
586
+ header_params["workload_identity_pool.name"] = request.workload_identity_pool.name
587
+ end
588
+
500
589
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
501
590
  metadata[:"x-goog-request-params"] ||= request_params_header
502
591
 
503
592
  options.apply_defaults timeout: @config.rpcs.update_workload_identity_pool.timeout,
504
593
  metadata: metadata,
505
594
  retry_policy: @config.rpcs.update_workload_identity_pool.retry_policy
506
- options.apply_defaults metadata: @config.metadata,
595
+
596
+ options.apply_defaults timeout: @config.timeout,
597
+ metadata: @config.metadata,
507
598
  retry_policy: @config.retry_policy
508
599
 
509
600
  @workload_identity_pools_stub.call_rpc :update_workload_identity_pool, request, options: options do |response, operation|
@@ -555,6 +646,28 @@ module Google
555
646
  #
556
647
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
557
648
  #
649
+ # @example Basic example
650
+ # require "google/iam/v1beta"
651
+ #
652
+ # # Create a client object. The client can be reused for multiple calls.
653
+ # client = Google::Iam::V1beta::WorkloadIdentityPools::Client.new
654
+ #
655
+ # # Create a request. To set request fields, pass in keyword arguments.
656
+ # request = Google::Iam::V1beta::DeleteWorkloadIdentityPoolRequest.new
657
+ #
658
+ # # Call the delete_workload_identity_pool method.
659
+ # result = client.delete_workload_identity_pool request
660
+ #
661
+ # # The returned object is of type Gapic::Operation. You can use this
662
+ # # object to check the status of an operation, cancel it, or wait
663
+ # # for results. Here is how to block until completion:
664
+ # result.wait_until_done! timeout: 60
665
+ # if result.response?
666
+ # p result.response
667
+ # else
668
+ # puts "Error!"
669
+ # end
670
+ #
558
671
  def delete_workload_identity_pool request, options = nil
559
672
  raise ::ArgumentError, "request must be provided" if request.nil?
560
673
 
@@ -572,16 +685,20 @@ module Google
572
685
  gapic_version: ::Google::Iam::V1beta::VERSION
573
686
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
574
687
 
575
- header_params = {
576
- "name" => request.name
577
- }
688
+ header_params = {}
689
+ if request.name
690
+ header_params["name"] = request.name
691
+ end
692
+
578
693
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
579
694
  metadata[:"x-goog-request-params"] ||= request_params_header
580
695
 
581
696
  options.apply_defaults timeout: @config.rpcs.delete_workload_identity_pool.timeout,
582
697
  metadata: metadata,
583
698
  retry_policy: @config.rpcs.delete_workload_identity_pool.retry_policy
584
- options.apply_defaults metadata: @config.metadata,
699
+
700
+ options.apply_defaults timeout: @config.timeout,
701
+ metadata: @config.metadata,
585
702
  retry_policy: @config.retry_policy
586
703
 
587
704
  @workload_identity_pools_stub.call_rpc :delete_workload_identity_pool, request, options: options do |response, operation|
@@ -623,6 +740,28 @@ module Google
623
740
  #
624
741
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
625
742
  #
743
+ # @example Basic example
744
+ # require "google/iam/v1beta"
745
+ #
746
+ # # Create a client object. The client can be reused for multiple calls.
747
+ # client = Google::Iam::V1beta::WorkloadIdentityPools::Client.new
748
+ #
749
+ # # Create a request. To set request fields, pass in keyword arguments.
750
+ # request = Google::Iam::V1beta::UndeleteWorkloadIdentityPoolRequest.new
751
+ #
752
+ # # Call the undelete_workload_identity_pool method.
753
+ # result = client.undelete_workload_identity_pool request
754
+ #
755
+ # # The returned object is of type Gapic::Operation. You can use this
756
+ # # object to check the status of an operation, cancel it, or wait
757
+ # # for results. Here is how to block until completion:
758
+ # result.wait_until_done! timeout: 60
759
+ # if result.response?
760
+ # p result.response
761
+ # else
762
+ # puts "Error!"
763
+ # end
764
+ #
626
765
  def undelete_workload_identity_pool request, options = nil
627
766
  raise ::ArgumentError, "request must be provided" if request.nil?
628
767
 
@@ -640,16 +779,20 @@ module Google
640
779
  gapic_version: ::Google::Iam::V1beta::VERSION
641
780
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
642
781
 
643
- header_params = {
644
- "name" => request.name
645
- }
782
+ header_params = {}
783
+ if request.name
784
+ header_params["name"] = request.name
785
+ end
786
+
646
787
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
647
788
  metadata[:"x-goog-request-params"] ||= request_params_header
648
789
 
649
790
  options.apply_defaults timeout: @config.rpcs.undelete_workload_identity_pool.timeout,
650
791
  metadata: metadata,
651
792
  retry_policy: @config.rpcs.undelete_workload_identity_pool.retry_policy
652
- options.apply_defaults metadata: @config.metadata,
793
+
794
+ options.apply_defaults timeout: @config.timeout,
795
+ metadata: @config.metadata,
653
796
  retry_policy: @config.retry_policy
654
797
 
655
798
  @workload_identity_pools_stub.call_rpc :undelete_workload_identity_pool, request, options: options do |response, operation|
@@ -703,6 +846,27 @@ module Google
703
846
  #
704
847
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
705
848
  #
849
+ # @example Basic example
850
+ # require "google/iam/v1beta"
851
+ #
852
+ # # Create a client object. The client can be reused for multiple calls.
853
+ # client = Google::Iam::V1beta::WorkloadIdentityPools::Client.new
854
+ #
855
+ # # Create a request. To set request fields, pass in keyword arguments.
856
+ # request = Google::Iam::V1beta::ListWorkloadIdentityPoolProvidersRequest.new
857
+ #
858
+ # # Call the list_workload_identity_pool_providers method.
859
+ # result = client.list_workload_identity_pool_providers request
860
+ #
861
+ # # The returned object is of type Gapic::PagedEnumerable. You can
862
+ # # iterate over all elements by calling #each, and the enumerable
863
+ # # will lazily make API calls to fetch subsequent pages. Other
864
+ # # methods are also available for managing paging directly.
865
+ # result.each do |response|
866
+ # # Each element is of type ::Google::Iam::V1beta::WorkloadIdentityPoolProvider.
867
+ # p response
868
+ # end
869
+ #
706
870
  def list_workload_identity_pool_providers request, options = nil
707
871
  raise ::ArgumentError, "request must be provided" if request.nil?
708
872
 
@@ -720,16 +884,20 @@ module Google
720
884
  gapic_version: ::Google::Iam::V1beta::VERSION
721
885
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
722
886
 
723
- header_params = {
724
- "parent" => request.parent
725
- }
887
+ header_params = {}
888
+ if request.parent
889
+ header_params["parent"] = request.parent
890
+ end
891
+
726
892
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
727
893
  metadata[:"x-goog-request-params"] ||= request_params_header
728
894
 
729
895
  options.apply_defaults timeout: @config.rpcs.list_workload_identity_pool_providers.timeout,
730
896
  metadata: metadata,
731
897
  retry_policy: @config.rpcs.list_workload_identity_pool_providers.retry_policy
732
- options.apply_defaults metadata: @config.metadata,
898
+
899
+ options.apply_defaults timeout: @config.timeout,
900
+ metadata: @config.metadata,
733
901
  retry_policy: @config.retry_policy
734
902
 
735
903
  @workload_identity_pools_stub.call_rpc :list_workload_identity_pool_providers, request, options: options do |response, operation|
@@ -771,6 +939,21 @@ module Google
771
939
  #
772
940
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
773
941
  #
942
+ # @example Basic example
943
+ # require "google/iam/v1beta"
944
+ #
945
+ # # Create a client object. The client can be reused for multiple calls.
946
+ # client = Google::Iam::V1beta::WorkloadIdentityPools::Client.new
947
+ #
948
+ # # Create a request. To set request fields, pass in keyword arguments.
949
+ # request = Google::Iam::V1beta::GetWorkloadIdentityPoolProviderRequest.new
950
+ #
951
+ # # Call the get_workload_identity_pool_provider method.
952
+ # result = client.get_workload_identity_pool_provider request
953
+ #
954
+ # # The returned object is of type Google::Iam::V1beta::WorkloadIdentityPoolProvider.
955
+ # p result
956
+ #
774
957
  def get_workload_identity_pool_provider request, options = nil
775
958
  raise ::ArgumentError, "request must be provided" if request.nil?
776
959
 
@@ -788,16 +971,20 @@ module Google
788
971
  gapic_version: ::Google::Iam::V1beta::VERSION
789
972
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
790
973
 
791
- header_params = {
792
- "name" => request.name
793
- }
974
+ header_params = {}
975
+ if request.name
976
+ header_params["name"] = request.name
977
+ end
978
+
794
979
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
795
980
  metadata[:"x-goog-request-params"] ||= request_params_header
796
981
 
797
982
  options.apply_defaults timeout: @config.rpcs.get_workload_identity_pool_provider.timeout,
798
983
  metadata: metadata,
799
984
  retry_policy: @config.rpcs.get_workload_identity_pool_provider.retry_policy
800
- options.apply_defaults metadata: @config.metadata,
985
+
986
+ options.apply_defaults timeout: @config.timeout,
987
+ metadata: @config.metadata,
801
988
  retry_policy: @config.retry_policy
802
989
 
803
990
  @workload_identity_pools_stub.call_rpc :get_workload_identity_pool_provider, request, options: options do |response, operation|
@@ -849,6 +1036,28 @@ module Google
849
1036
  #
850
1037
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
851
1038
  #
1039
+ # @example Basic example
1040
+ # require "google/iam/v1beta"
1041
+ #
1042
+ # # Create a client object. The client can be reused for multiple calls.
1043
+ # client = Google::Iam::V1beta::WorkloadIdentityPools::Client.new
1044
+ #
1045
+ # # Create a request. To set request fields, pass in keyword arguments.
1046
+ # request = Google::Iam::V1beta::CreateWorkloadIdentityPoolProviderRequest.new
1047
+ #
1048
+ # # Call the create_workload_identity_pool_provider method.
1049
+ # result = client.create_workload_identity_pool_provider request
1050
+ #
1051
+ # # The returned object is of type Gapic::Operation. You can use this
1052
+ # # object to check the status of an operation, cancel it, or wait
1053
+ # # for results. Here is how to block until completion:
1054
+ # result.wait_until_done! timeout: 60
1055
+ # if result.response?
1056
+ # p result.response
1057
+ # else
1058
+ # puts "Error!"
1059
+ # end
1060
+ #
852
1061
  def create_workload_identity_pool_provider request, options = nil
853
1062
  raise ::ArgumentError, "request must be provided" if request.nil?
854
1063
 
@@ -866,16 +1075,20 @@ module Google
866
1075
  gapic_version: ::Google::Iam::V1beta::VERSION
867
1076
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
868
1077
 
869
- header_params = {
870
- "parent" => request.parent
871
- }
1078
+ header_params = {}
1079
+ if request.parent
1080
+ header_params["parent"] = request.parent
1081
+ end
1082
+
872
1083
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
873
1084
  metadata[:"x-goog-request-params"] ||= request_params_header
874
1085
 
875
1086
  options.apply_defaults timeout: @config.rpcs.create_workload_identity_pool_provider.timeout,
876
1087
  metadata: metadata,
877
1088
  retry_policy: @config.rpcs.create_workload_identity_pool_provider.retry_policy
878
- options.apply_defaults metadata: @config.metadata,
1089
+
1090
+ options.apply_defaults timeout: @config.timeout,
1091
+ metadata: @config.metadata,
879
1092
  retry_policy: @config.retry_policy
880
1093
 
881
1094
  @workload_identity_pools_stub.call_rpc :create_workload_identity_pool_provider, request, options: options do |response, operation|
@@ -919,6 +1132,28 @@ module Google
919
1132
  #
920
1133
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
921
1134
  #
1135
+ # @example Basic example
1136
+ # require "google/iam/v1beta"
1137
+ #
1138
+ # # Create a client object. The client can be reused for multiple calls.
1139
+ # client = Google::Iam::V1beta::WorkloadIdentityPools::Client.new
1140
+ #
1141
+ # # Create a request. To set request fields, pass in keyword arguments.
1142
+ # request = Google::Iam::V1beta::UpdateWorkloadIdentityPoolProviderRequest.new
1143
+ #
1144
+ # # Call the update_workload_identity_pool_provider method.
1145
+ # result = client.update_workload_identity_pool_provider request
1146
+ #
1147
+ # # The returned object is of type Gapic::Operation. You can use this
1148
+ # # object to check the status of an operation, cancel it, or wait
1149
+ # # for results. Here is how to block until completion:
1150
+ # result.wait_until_done! timeout: 60
1151
+ # if result.response?
1152
+ # p result.response
1153
+ # else
1154
+ # puts "Error!"
1155
+ # end
1156
+ #
922
1157
  def update_workload_identity_pool_provider request, options = nil
923
1158
  raise ::ArgumentError, "request must be provided" if request.nil?
924
1159
 
@@ -936,16 +1171,20 @@ module Google
936
1171
  gapic_version: ::Google::Iam::V1beta::VERSION
937
1172
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
938
1173
 
939
- header_params = {
940
- "workload_identity_pool_provider.name" => request.workload_identity_pool_provider.name
941
- }
1174
+ header_params = {}
1175
+ if request.workload_identity_pool_provider&.name
1176
+ header_params["workload_identity_pool_provider.name"] = request.workload_identity_pool_provider.name
1177
+ end
1178
+
942
1179
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
943
1180
  metadata[:"x-goog-request-params"] ||= request_params_header
944
1181
 
945
1182
  options.apply_defaults timeout: @config.rpcs.update_workload_identity_pool_provider.timeout,
946
1183
  metadata: metadata,
947
1184
  retry_policy: @config.rpcs.update_workload_identity_pool_provider.retry_policy
948
- options.apply_defaults metadata: @config.metadata,
1185
+
1186
+ options.apply_defaults timeout: @config.timeout,
1187
+ metadata: @config.metadata,
949
1188
  retry_policy: @config.retry_policy
950
1189
 
951
1190
  @workload_identity_pools_stub.call_rpc :update_workload_identity_pool_provider, request, options: options do |response, operation|
@@ -992,6 +1231,28 @@ module Google
992
1231
  #
993
1232
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
994
1233
  #
1234
+ # @example Basic example
1235
+ # require "google/iam/v1beta"
1236
+ #
1237
+ # # Create a client object. The client can be reused for multiple calls.
1238
+ # client = Google::Iam::V1beta::WorkloadIdentityPools::Client.new
1239
+ #
1240
+ # # Create a request. To set request fields, pass in keyword arguments.
1241
+ # request = Google::Iam::V1beta::DeleteWorkloadIdentityPoolProviderRequest.new
1242
+ #
1243
+ # # Call the delete_workload_identity_pool_provider method.
1244
+ # result = client.delete_workload_identity_pool_provider request
1245
+ #
1246
+ # # The returned object is of type Gapic::Operation. You can use this
1247
+ # # object to check the status of an operation, cancel it, or wait
1248
+ # # for results. Here is how to block until completion:
1249
+ # result.wait_until_done! timeout: 60
1250
+ # if result.response?
1251
+ # p result.response
1252
+ # else
1253
+ # puts "Error!"
1254
+ # end
1255
+ #
995
1256
  def delete_workload_identity_pool_provider request, options = nil
996
1257
  raise ::ArgumentError, "request must be provided" if request.nil?
997
1258
 
@@ -1009,16 +1270,20 @@ module Google
1009
1270
  gapic_version: ::Google::Iam::V1beta::VERSION
1010
1271
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1011
1272
 
1012
- header_params = {
1013
- "name" => request.name
1014
- }
1273
+ header_params = {}
1274
+ if request.name
1275
+ header_params["name"] = request.name
1276
+ end
1277
+
1015
1278
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1016
1279
  metadata[:"x-goog-request-params"] ||= request_params_header
1017
1280
 
1018
1281
  options.apply_defaults timeout: @config.rpcs.delete_workload_identity_pool_provider.timeout,
1019
1282
  metadata: metadata,
1020
1283
  retry_policy: @config.rpcs.delete_workload_identity_pool_provider.retry_policy
1021
- options.apply_defaults metadata: @config.metadata,
1284
+
1285
+ options.apply_defaults timeout: @config.timeout,
1286
+ metadata: @config.metadata,
1022
1287
  retry_policy: @config.retry_policy
1023
1288
 
1024
1289
  @workload_identity_pools_stub.call_rpc :delete_workload_identity_pool_provider, request, options: options do |response, operation|
@@ -1061,6 +1326,28 @@ module Google
1061
1326
  #
1062
1327
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
1063
1328
  #
1329
+ # @example Basic example
1330
+ # require "google/iam/v1beta"
1331
+ #
1332
+ # # Create a client object. The client can be reused for multiple calls.
1333
+ # client = Google::Iam::V1beta::WorkloadIdentityPools::Client.new
1334
+ #
1335
+ # # Create a request. To set request fields, pass in keyword arguments.
1336
+ # request = Google::Iam::V1beta::UndeleteWorkloadIdentityPoolProviderRequest.new
1337
+ #
1338
+ # # Call the undelete_workload_identity_pool_provider method.
1339
+ # result = client.undelete_workload_identity_pool_provider request
1340
+ #
1341
+ # # The returned object is of type Gapic::Operation. You can use this
1342
+ # # object to check the status of an operation, cancel it, or wait
1343
+ # # for results. Here is how to block until completion:
1344
+ # result.wait_until_done! timeout: 60
1345
+ # if result.response?
1346
+ # p result.response
1347
+ # else
1348
+ # puts "Error!"
1349
+ # end
1350
+ #
1064
1351
  def undelete_workload_identity_pool_provider request, options = nil
1065
1352
  raise ::ArgumentError, "request must be provided" if request.nil?
1066
1353
 
@@ -1078,16 +1365,20 @@ module Google
1078
1365
  gapic_version: ::Google::Iam::V1beta::VERSION
1079
1366
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
1080
1367
 
1081
- header_params = {
1082
- "name" => request.name
1083
- }
1368
+ header_params = {}
1369
+ if request.name
1370
+ header_params["name"] = request.name
1371
+ end
1372
+
1084
1373
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
1085
1374
  metadata[:"x-goog-request-params"] ||= request_params_header
1086
1375
 
1087
1376
  options.apply_defaults timeout: @config.rpcs.undelete_workload_identity_pool_provider.timeout,
1088
1377
  metadata: metadata,
1089
1378
  retry_policy: @config.rpcs.undelete_workload_identity_pool_provider.retry_policy
1090
- options.apply_defaults metadata: @config.metadata,
1379
+
1380
+ options.apply_defaults timeout: @config.timeout,
1381
+ metadata: @config.metadata,
1091
1382
  retry_policy: @config.retry_policy
1092
1383
 
1093
1384
  @workload_identity_pools_stub.call_rpc :undelete_workload_identity_pool_provider, request, options: options do |response, operation|
@@ -1112,22 +1403,21 @@ module Google
1112
1403
  # Configuration can be applied globally to all clients, or to a single client
1113
1404
  # on construction.
1114
1405
  #
1115
- # # Examples
1116
- #
1117
- # To modify the global config, setting the timeout for list_workload_identity_pools
1118
- # to 20 seconds, and all remaining timeouts to 10 seconds:
1119
- #
1120
- # ::Google::Iam::V1beta::WorkloadIdentityPools::Client.configure do |config|
1121
- # config.timeout = 10.0
1122
- # config.rpcs.list_workload_identity_pools.timeout = 20.0
1123
- # end
1124
- #
1125
- # To apply the above configuration only to a new client:
1126
- #
1127
- # client = ::Google::Iam::V1beta::WorkloadIdentityPools::Client.new do |config|
1128
- # config.timeout = 10.0
1129
- # config.rpcs.list_workload_identity_pools.timeout = 20.0
1130
- # end
1406
+ # @example
1407
+ #
1408
+ # # Modify the global config, setting the timeout for
1409
+ # # list_workload_identity_pools to 20 seconds,
1410
+ # # and all remaining timeouts to 10 seconds.
1411
+ # ::Google::Iam::V1beta::WorkloadIdentityPools::Client.configure do |config|
1412
+ # config.timeout = 10.0
1413
+ # config.rpcs.list_workload_identity_pools.timeout = 20.0
1414
+ # end
1415
+ #
1416
+ # # Apply the above configuration only to a new client.
1417
+ # client = ::Google::Iam::V1beta::WorkloadIdentityPools::Client.new do |config|
1418
+ # config.timeout = 10.0
1419
+ # config.rpcs.list_workload_identity_pools.timeout = 20.0
1420
+ # end
1131
1421
  #
1132
1422
  # @!attribute [rw] endpoint
1133
1423
  # The hostname or hostname:port of the service endpoint.
@@ -142,6 +142,27 @@ module Google
142
142
  #
143
143
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
144
144
  #
145
+ # @example Basic example
146
+ # require "google/longrunning"
147
+ #
148
+ # # Create a client object. The client can be reused for multiple calls.
149
+ # client = Google::Longrunning::Operations::Client.new
150
+ #
151
+ # # Create a request. To set request fields, pass in keyword arguments.
152
+ # request = Google::Longrunning::ListOperationsRequest.new
153
+ #
154
+ # # Call the list_operations method.
155
+ # result = client.list_operations request
156
+ #
157
+ # # The returned object is of type Gapic::PagedEnumerable. You can
158
+ # # iterate over all elements by calling #each, and the enumerable
159
+ # # will lazily make API calls to fetch subsequent pages. Other
160
+ # # methods are also available for managing paging directly.
161
+ # result.each do |response|
162
+ # # Each element is of type ::Google::Longrunning::Operation.
163
+ # p response
164
+ # end
165
+ #
145
166
  def list_operations request, options = nil
146
167
  raise ::ArgumentError, "request must be provided" if request.nil?
147
168
 
@@ -159,16 +180,20 @@ module Google
159
180
  gapic_version: ::Google::Iam::V1beta::VERSION
160
181
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
161
182
 
162
- header_params = {
163
- "name" => request.name
164
- }
183
+ header_params = {}
184
+ if request.name
185
+ header_params["name"] = request.name
186
+ end
187
+
165
188
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
166
189
  metadata[:"x-goog-request-params"] ||= request_params_header
167
190
 
168
191
  options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
169
192
  metadata: metadata,
170
193
  retry_policy: @config.rpcs.list_operations.retry_policy
171
- options.apply_defaults metadata: @config.metadata,
194
+
195
+ options.apply_defaults timeout: @config.timeout,
196
+ metadata: @config.metadata,
172
197
  retry_policy: @config.retry_policy
173
198
 
174
199
  @operations_stub.call_rpc :list_operations, request, options: options do |response, operation|
@@ -212,6 +237,28 @@ module Google
212
237
  #
213
238
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
214
239
  #
240
+ # @example Basic example
241
+ # require "google/longrunning"
242
+ #
243
+ # # Create a client object. The client can be reused for multiple calls.
244
+ # client = Google::Longrunning::Operations::Client.new
245
+ #
246
+ # # Create a request. To set request fields, pass in keyword arguments.
247
+ # request = Google::Longrunning::GetOperationRequest.new
248
+ #
249
+ # # Call the get_operation method.
250
+ # result = client.get_operation request
251
+ #
252
+ # # The returned object is of type Gapic::Operation. You can use this
253
+ # # object to check the status of an operation, cancel it, or wait
254
+ # # for results. Here is how to block until completion:
255
+ # result.wait_until_done! timeout: 60
256
+ # if result.response?
257
+ # p result.response
258
+ # else
259
+ # puts "Error!"
260
+ # end
261
+ #
215
262
  def get_operation request, options = nil
216
263
  raise ::ArgumentError, "request must be provided" if request.nil?
217
264
 
@@ -229,16 +276,20 @@ module Google
229
276
  gapic_version: ::Google::Iam::V1beta::VERSION
230
277
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
231
278
 
232
- header_params = {
233
- "name" => request.name
234
- }
279
+ header_params = {}
280
+ if request.name
281
+ header_params["name"] = request.name
282
+ end
283
+
235
284
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
236
285
  metadata[:"x-goog-request-params"] ||= request_params_header
237
286
 
238
287
  options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
239
288
  metadata: metadata,
240
289
  retry_policy: @config.rpcs.get_operation.retry_policy
241
- options.apply_defaults metadata: @config.metadata,
290
+
291
+ options.apply_defaults timeout: @config.timeout,
292
+ metadata: @config.metadata,
242
293
  retry_policy: @config.retry_policy
243
294
 
244
295
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
@@ -282,6 +333,21 @@ module Google
282
333
  #
283
334
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
284
335
  #
336
+ # @example Basic example
337
+ # require "google/longrunning"
338
+ #
339
+ # # Create a client object. The client can be reused for multiple calls.
340
+ # client = Google::Longrunning::Operations::Client.new
341
+ #
342
+ # # Create a request. To set request fields, pass in keyword arguments.
343
+ # request = Google::Longrunning::DeleteOperationRequest.new
344
+ #
345
+ # # Call the delete_operation method.
346
+ # result = client.delete_operation request
347
+ #
348
+ # # The returned object is of type Google::Protobuf::Empty.
349
+ # p result
350
+ #
285
351
  def delete_operation request, options = nil
286
352
  raise ::ArgumentError, "request must be provided" if request.nil?
287
353
 
@@ -299,16 +365,20 @@ module Google
299
365
  gapic_version: ::Google::Iam::V1beta::VERSION
300
366
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
301
367
 
302
- header_params = {
303
- "name" => request.name
304
- }
368
+ header_params = {}
369
+ if request.name
370
+ header_params["name"] = request.name
371
+ end
372
+
305
373
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
306
374
  metadata[:"x-goog-request-params"] ||= request_params_header
307
375
 
308
376
  options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
309
377
  metadata: metadata,
310
378
  retry_policy: @config.rpcs.delete_operation.retry_policy
311
- options.apply_defaults metadata: @config.metadata,
379
+
380
+ options.apply_defaults timeout: @config.timeout,
381
+ metadata: @config.metadata,
312
382
  retry_policy: @config.retry_policy
313
383
 
314
384
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
@@ -357,6 +427,21 @@ module Google
357
427
  #
358
428
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
359
429
  #
430
+ # @example Basic example
431
+ # require "google/longrunning"
432
+ #
433
+ # # Create a client object. The client can be reused for multiple calls.
434
+ # client = Google::Longrunning::Operations::Client.new
435
+ #
436
+ # # Create a request. To set request fields, pass in keyword arguments.
437
+ # request = Google::Longrunning::CancelOperationRequest.new
438
+ #
439
+ # # Call the cancel_operation method.
440
+ # result = client.cancel_operation request
441
+ #
442
+ # # The returned object is of type Google::Protobuf::Empty.
443
+ # p result
444
+ #
360
445
  def cancel_operation request, options = nil
361
446
  raise ::ArgumentError, "request must be provided" if request.nil?
362
447
 
@@ -374,16 +459,20 @@ module Google
374
459
  gapic_version: ::Google::Iam::V1beta::VERSION
375
460
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
376
461
 
377
- header_params = {
378
- "name" => request.name
379
- }
462
+ header_params = {}
463
+ if request.name
464
+ header_params["name"] = request.name
465
+ end
466
+
380
467
  request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
381
468
  metadata[:"x-goog-request-params"] ||= request_params_header
382
469
 
383
470
  options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
384
471
  metadata: metadata,
385
472
  retry_policy: @config.rpcs.cancel_operation.retry_policy
386
- options.apply_defaults metadata: @config.metadata,
473
+
474
+ options.apply_defaults timeout: @config.timeout,
475
+ metadata: @config.metadata,
387
476
  retry_policy: @config.retry_policy
388
477
 
389
478
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
@@ -435,6 +524,28 @@ module Google
435
524
  #
436
525
  # @raise [::Google::Cloud::Error] if the RPC is aborted.
437
526
  #
527
+ # @example Basic example
528
+ # require "google/longrunning"
529
+ #
530
+ # # Create a client object. The client can be reused for multiple calls.
531
+ # client = Google::Longrunning::Operations::Client.new
532
+ #
533
+ # # Create a request. To set request fields, pass in keyword arguments.
534
+ # request = Google::Longrunning::WaitOperationRequest.new
535
+ #
536
+ # # Call the wait_operation method.
537
+ # result = client.wait_operation request
538
+ #
539
+ # # The returned object is of type Gapic::Operation. You can use this
540
+ # # object to check the status of an operation, cancel it, or wait
541
+ # # for results. Here is how to block until completion:
542
+ # result.wait_until_done! timeout: 60
543
+ # if result.response?
544
+ # p result.response
545
+ # else
546
+ # puts "Error!"
547
+ # end
548
+ #
438
549
  def wait_operation request, options = nil
439
550
  raise ::ArgumentError, "request must be provided" if request.nil?
440
551
 
@@ -455,7 +566,9 @@ module Google
455
566
  options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
456
567
  metadata: metadata,
457
568
  retry_policy: @config.rpcs.wait_operation.retry_policy
458
- options.apply_defaults metadata: @config.metadata,
569
+
570
+ options.apply_defaults timeout: @config.timeout,
571
+ metadata: @config.metadata,
459
572
  retry_policy: @config.retry_policy
460
573
 
461
574
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
@@ -480,22 +593,21 @@ module Google
480
593
  # Configuration can be applied globally to all clients, or to a single client
481
594
  # on construction.
482
595
  #
483
- # # Examples
484
- #
485
- # To modify the global config, setting the timeout for list_operations
486
- # to 20 seconds, and all remaining timeouts to 10 seconds:
487
- #
488
- # ::Google::Longrunning::Operations::Client.configure do |config|
489
- # config.timeout = 10.0
490
- # config.rpcs.list_operations.timeout = 20.0
491
- # end
492
- #
493
- # To apply the above configuration only to a new client:
494
- #
495
- # client = ::Google::Longrunning::Operations::Client.new do |config|
496
- # config.timeout = 10.0
497
- # config.rpcs.list_operations.timeout = 20.0
498
- # end
596
+ # @example
597
+ #
598
+ # # Modify the global config, setting the timeout for
599
+ # # list_operations to 20 seconds,
600
+ # # and all remaining timeouts to 10 seconds.
601
+ # ::Google::Longrunning::Operations::Client.configure do |config|
602
+ # config.timeout = 10.0
603
+ # config.rpcs.list_operations.timeout = 20.0
604
+ # end
605
+ #
606
+ # # Apply the above configuration only to a new client.
607
+ # client = ::Google::Longrunning::Operations::Client.new do |config|
608
+ # config.timeout = 10.0
609
+ # config.rpcs.list_operations.timeout = 20.0
610
+ # end
499
611
  #
500
612
  # @!attribute [rw] endpoint
501
613
  # The hostname or hostname:port of the service endpoint.
@@ -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
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-iam-v1beta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.6
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-07-08 00:00:00.000000000 Z
11
+ date: 2022-01-11 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.5'
19
+ version: '0.7'
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.5'
29
+ version: '0.7'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
209
  requirements: []
210
- rubygems_version: 3.2.17
210
+ rubygems_version: 3.3.4
211
211
  signing_key:
212
212
  specification_version: 4
213
213
  summary: API Client library for the Google IAM V1beta API