google-iam-v2 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6943707ac7a32f8a895195cbc9cb8777a0fc95ce8a4abd607c8c7f6c451885b3
4
- data.tar.gz: bb476b2db4d45b9ef5d03ee92528b7e633fb7c0636ebf34aecb24655a1148243
3
+ metadata.gz: 32c3d0e641659cbd636508643d2c7b19b6b422df11d09f00dd61cb9ef3bdb13f
4
+ data.tar.gz: 7496444b2d982da0041f314c2e714d36c971be3a0fac47bed4a29a144381a98e
5
5
  SHA512:
6
- metadata.gz: b60d7cf0a0ad8bcc4fd42d0b770ea66985242634ccdfbb86bfa841c9cb171e202fbbd80a76a62f3fa95a24bdecfe55c49143ae2a0a1bd96f6d604bb3747f8027
7
- data.tar.gz: 6a2a820967282d92dac31d447ade9c2bbff40e933176d0f5b7bab28cb416fdc682dbe65d7c8e7ba4ff3a5dadb9ff8e6da1a30f0bb852a38ca0d5d3d9d05c2f06
6
+ metadata.gz: 84e84231b7395ce1dba409e64608fa7ea4918252777393ef8f6766a26eca9c862c11173f376ad96be8d732b4d8b23a5ab8e7c6d2c56e0a931a68495e45bdb247
7
+ data.tar.gz: 79d6a2e027adcb49476af214e2cb405dc209a76e2a57341b8ac7c0a6685644b3e8f49d572fe17901f98be9a512146a54a728c8ef3e07cce73589f09bc28f030f
@@ -145,7 +145,7 @@ module Google
145
145
  credentials = @config.credentials
146
146
  # Use self-signed JWT if the endpoint is unchanged from default,
147
147
  # but only if the default endpoint does not have a region prefix.
148
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
148
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
149
149
  !@config.endpoint.split(".").first.include?("-")
150
150
  credentials ||= Credentials.default scope: @config.scope,
151
151
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -166,7 +166,8 @@ module Google
166
166
  credentials: credentials,
167
167
  endpoint: @config.endpoint,
168
168
  channel_args: @config.channel_args,
169
- interceptors: @config.interceptors
169
+ interceptors: @config.interceptors,
170
+ channel_pool_config: @config.channel_pool
170
171
  )
171
172
  end
172
173
 
@@ -792,7 +793,9 @@ module Google
792
793
  class Configuration
793
794
  extend ::Gapic::Config
794
795
 
795
- config_attr :endpoint, "iam.googleapis.com", ::String
796
+ DEFAULT_ENDPOINT = "iam.googleapis.com"
797
+
798
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
796
799
  config_attr :credentials, nil do |value|
797
800
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
798
801
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -827,6 +830,14 @@ module Google
827
830
  end
828
831
  end
829
832
 
833
+ ##
834
+ # Configuration for the channel pool
835
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
836
+ #
837
+ def channel_pool
838
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
839
+ end
840
+
830
841
  ##
831
842
  # Configuration RPC class for the Policies API.
832
843
  #
@@ -92,7 +92,8 @@ module Google
92
92
  credentials: credentials,
93
93
  endpoint: @config.endpoint,
94
94
  channel_args: @config.channel_args,
95
- interceptors: @config.interceptors
95
+ interceptors: @config.interceptors,
96
+ channel_pool_config: @config.channel_pool
96
97
  )
97
98
 
98
99
  # Used by an LRO wrapper for some methods of this service
@@ -663,7 +664,9 @@ module Google
663
664
  class Configuration
664
665
  extend ::Gapic::Config
665
666
 
666
- config_attr :endpoint, "iam.googleapis.com", ::String
667
+ DEFAULT_ENDPOINT = "iam.googleapis.com"
668
+
669
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
667
670
  config_attr :credentials, nil do |value|
668
671
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
669
672
  allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
@@ -698,6 +701,14 @@ module Google
698
701
  end
699
702
  end
700
703
 
704
+ ##
705
+ # Configuration for the channel pool
706
+ # @return [::Gapic::ServiceStub::ChannelPool::Configuration]
707
+ #
708
+ def channel_pool
709
+ @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
710
+ end
711
+
701
712
  ##
702
713
  # Configuration RPC class for the Operations API.
703
714
  #
@@ -141,7 +141,7 @@ module Google
141
141
  credentials = @config.credentials
142
142
  # Use self-signed JWT if the endpoint is unchanged from default,
143
143
  # but only if the default endpoint does not have a region prefix.
144
- enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
144
+ enable_self_signed_jwt = @config.endpoint == Configuration::DEFAULT_ENDPOINT &&
145
145
  !@config.endpoint.split(".").first.include?("-")
146
146
  credentials ||= Credentials.default scope: @config.scope,
147
147
  enable_self_signed_jwt: enable_self_signed_jwt
@@ -218,6 +218,26 @@ module Google
218
218
  # @return [::Gapic::Rest::PagedEnumerable<::Google::Iam::V2::Policy>]
219
219
  #
220
220
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
221
+ #
222
+ # @example Basic example
223
+ # require "google/iam/v2"
224
+ #
225
+ # # Create a client object. The client can be reused for multiple calls.
226
+ # client = Google::Iam::V2::Policies::Rest::Client.new
227
+ #
228
+ # # Create a request. To set request fields, pass in keyword arguments.
229
+ # request = Google::Iam::V2::ListPoliciesRequest.new
230
+ #
231
+ # # Call the list_policies method.
232
+ # result = client.list_policies request
233
+ #
234
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
235
+ # # over elements, and API calls will be issued to fetch pages as needed.
236
+ # result.each do |item|
237
+ # # Each element is of type ::Google::Iam::V2::Policy.
238
+ # p item
239
+ # end
240
+ #
221
241
  def list_policies request, options = nil
222
242
  raise ::ArgumentError, "request must be provided" if request.nil?
223
243
 
@@ -290,6 +310,22 @@ module Google
290
310
  # @return [::Google::Iam::V2::Policy]
291
311
  #
292
312
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
313
+ #
314
+ # @example Basic example
315
+ # require "google/iam/v2"
316
+ #
317
+ # # Create a client object. The client can be reused for multiple calls.
318
+ # client = Google::Iam::V2::Policies::Rest::Client.new
319
+ #
320
+ # # Create a request. To set request fields, pass in keyword arguments.
321
+ # request = Google::Iam::V2::GetPolicyRequest.new
322
+ #
323
+ # # Call the get_policy method.
324
+ # result = client.get_policy request
325
+ #
326
+ # # The returned object is of type Google::Iam::V2::Policy.
327
+ # p result
328
+ #
293
329
  def get_policy request, options = nil
294
330
  raise ::ArgumentError, "request must be provided" if request.nil?
295
331
 
@@ -369,6 +405,29 @@ module Google
369
405
  # @return [::Gapic::Operation]
370
406
  #
371
407
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
408
+ #
409
+ # @example Basic example
410
+ # require "google/iam/v2"
411
+ #
412
+ # # Create a client object. The client can be reused for multiple calls.
413
+ # client = Google::Iam::V2::Policies::Rest::Client.new
414
+ #
415
+ # # Create a request. To set request fields, pass in keyword arguments.
416
+ # request = Google::Iam::V2::CreatePolicyRequest.new
417
+ #
418
+ # # Call the create_policy method.
419
+ # result = client.create_policy request
420
+ #
421
+ # # The returned object is of type Gapic::Operation. You can use it to
422
+ # # check the status of an operation, cancel it, or wait for results.
423
+ # # Here is how to wait for a response.
424
+ # result.wait_until_done! timeout: 60
425
+ # if result.response?
426
+ # p result.response
427
+ # else
428
+ # puts "No response received."
429
+ # end
430
+ #
372
431
  def create_policy request, options = nil
373
432
  raise ::ArgumentError, "request must be provided" if request.nil?
374
433
 
@@ -446,6 +505,29 @@ module Google
446
505
  # @return [::Gapic::Operation]
447
506
  #
448
507
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
508
+ #
509
+ # @example Basic example
510
+ # require "google/iam/v2"
511
+ #
512
+ # # Create a client object. The client can be reused for multiple calls.
513
+ # client = Google::Iam::V2::Policies::Rest::Client.new
514
+ #
515
+ # # Create a request. To set request fields, pass in keyword arguments.
516
+ # request = Google::Iam::V2::UpdatePolicyRequest.new
517
+ #
518
+ # # Call the update_policy method.
519
+ # result = client.update_policy request
520
+ #
521
+ # # The returned object is of type Gapic::Operation. You can use it to
522
+ # # check the status of an operation, cancel it, or wait for results.
523
+ # # Here is how to wait for a response.
524
+ # result.wait_until_done! timeout: 60
525
+ # if result.response?
526
+ # p result.response
527
+ # else
528
+ # puts "No response received."
529
+ # end
530
+ #
449
531
  def update_policy request, options = nil
450
532
  raise ::ArgumentError, "request must be provided" if request.nil?
451
533
 
@@ -525,6 +607,29 @@ module Google
525
607
  # @return [::Gapic::Operation]
526
608
  #
527
609
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
610
+ #
611
+ # @example Basic example
612
+ # require "google/iam/v2"
613
+ #
614
+ # # Create a client object. The client can be reused for multiple calls.
615
+ # client = Google::Iam::V2::Policies::Rest::Client.new
616
+ #
617
+ # # Create a request. To set request fields, pass in keyword arguments.
618
+ # request = Google::Iam::V2::DeletePolicyRequest.new
619
+ #
620
+ # # Call the delete_policy method.
621
+ # result = client.delete_policy request
622
+ #
623
+ # # The returned object is of type Gapic::Operation. You can use it to
624
+ # # check the status of an operation, cancel it, or wait for results.
625
+ # # Here is how to wait for a response.
626
+ # result.wait_until_done! timeout: 60
627
+ # if result.response?
628
+ # p result.response
629
+ # else
630
+ # puts "No response received."
631
+ # end
632
+ #
528
633
  def delete_policy request, options = nil
529
634
  raise ::ArgumentError, "request must be provided" if request.nil?
530
635
 
@@ -634,7 +739,9 @@ module Google
634
739
  class Configuration
635
740
  extend ::Gapic::Config
636
741
 
637
- config_attr :endpoint, "iam.googleapis.com", ::String
742
+ DEFAULT_ENDPOINT = "iam.googleapis.com"
743
+
744
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
638
745
  config_attr :credentials, nil do |value|
639
746
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
640
747
  allowed.any? { |klass| klass === value }
@@ -135,6 +135,26 @@ module Google
135
135
  # @return [::Gapic::Operation]
136
136
  #
137
137
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
138
+ #
139
+ # @example Basic example
140
+ # require "google/longrunning"
141
+ #
142
+ # # Create a client object. The client can be reused for multiple calls.
143
+ # client = Google::Longrunning::Operations::Rest::Client.new
144
+ #
145
+ # # Create a request. To set request fields, pass in keyword arguments.
146
+ # request = Google::Longrunning::ListOperationsRequest.new
147
+ #
148
+ # # Call the list_operations method.
149
+ # result = client.list_operations request
150
+ #
151
+ # # The returned object is of type Gapic::PagedEnumerable. You can iterate
152
+ # # over elements, and API calls will be issued to fetch pages as needed.
153
+ # result.each do |item|
154
+ # # Each element is of type ::Google::Longrunning::Operation.
155
+ # p item
156
+ # end
157
+ #
138
158
  def list_operations request, options = nil
139
159
  raise ::ArgumentError, "request must be provided" if request.nil?
140
160
 
@@ -200,6 +220,29 @@ module Google
200
220
  # @return [::Gapic::Operation]
201
221
  #
202
222
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
223
+ #
224
+ # @example Basic example
225
+ # require "google/longrunning"
226
+ #
227
+ # # Create a client object. The client can be reused for multiple calls.
228
+ # client = Google::Longrunning::Operations::Rest::Client.new
229
+ #
230
+ # # Create a request. To set request fields, pass in keyword arguments.
231
+ # request = Google::Longrunning::GetOperationRequest.new
232
+ #
233
+ # # Call the get_operation method.
234
+ # result = client.get_operation request
235
+ #
236
+ # # The returned object is of type Gapic::Operation. You can use it to
237
+ # # check the status of an operation, cancel it, or wait for results.
238
+ # # Here is how to wait for a response.
239
+ # result.wait_until_done! timeout: 60
240
+ # if result.response?
241
+ # p result.response
242
+ # else
243
+ # puts "No response received."
244
+ # end
245
+ #
203
246
  def get_operation request, options = nil
204
247
  raise ::ArgumentError, "request must be provided" if request.nil?
205
248
 
@@ -266,6 +309,22 @@ module Google
266
309
  # @return [::Google::Protobuf::Empty]
267
310
  #
268
311
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
312
+ #
313
+ # @example Basic example
314
+ # require "google/longrunning"
315
+ #
316
+ # # Create a client object. The client can be reused for multiple calls.
317
+ # client = Google::Longrunning::Operations::Rest::Client.new
318
+ #
319
+ # # Create a request. To set request fields, pass in keyword arguments.
320
+ # request = Google::Longrunning::DeleteOperationRequest.new
321
+ #
322
+ # # Call the delete_operation method.
323
+ # result = client.delete_operation request
324
+ #
325
+ # # The returned object is of type Google::Protobuf::Empty.
326
+ # p result
327
+ #
269
328
  def delete_operation request, options = nil
270
329
  raise ::ArgumentError, "request must be provided" if request.nil?
271
330
 
@@ -337,6 +396,22 @@ module Google
337
396
  # @return [::Google::Protobuf::Empty]
338
397
  #
339
398
  # @raise [::Google::Cloud::Error] if the REST call is aborted.
399
+ #
400
+ # @example Basic example
401
+ # require "google/longrunning"
402
+ #
403
+ # # Create a client object. The client can be reused for multiple calls.
404
+ # client = Google::Longrunning::Operations::Rest::Client.new
405
+ #
406
+ # # Create a request. To set request fields, pass in keyword arguments.
407
+ # request = Google::Longrunning::CancelOperationRequest.new
408
+ #
409
+ # # Call the cancel_operation method.
410
+ # result = client.cancel_operation request
411
+ #
412
+ # # The returned object is of type Google::Protobuf::Empty.
413
+ # p result
414
+ #
340
415
  def cancel_operation request, options = nil
341
416
  raise ::ArgumentError, "request must be provided" if request.nil?
342
417
 
@@ -445,7 +520,9 @@ module Google
445
520
  class Configuration
446
521
  extend ::Gapic::Config
447
522
 
448
- config_attr :endpoint, "iam.googleapis.com", ::String
523
+ DEFAULT_ENDPOINT = "iam.googleapis.com"
524
+
525
+ config_attr :endpoint, DEFAULT_ENDPOINT, ::String
449
526
  config_attr :credentials, nil do |value|
450
527
  allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
451
528
  allowed.any? { |klass| klass === value }
@@ -566,7 +643,7 @@ module Google
566
643
 
567
644
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb
568
645
  query_string_params = if query_string_params.any?
569
- query_string_params.to_h { |p| p.split("=", 2) }
646
+ query_string_params.to_h { |p| p.split "=", 2 }
570
647
  else
571
648
  {}
572
649
  end
@@ -604,7 +681,7 @@ module Google
604
681
 
605
682
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb
606
683
  query_string_params = if query_string_params.any?
607
- query_string_params.to_h { |p| p.split("=", 2) }
684
+ query_string_params.to_h { |p| p.split "=", 2 }
608
685
  else
609
686
  {}
610
687
  end
@@ -642,7 +719,7 @@ module Google
642
719
 
643
720
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb
644
721
  query_string_params = if query_string_params.any?
645
- query_string_params.to_h { |p| p.split("=", 2) }
722
+ query_string_params.to_h { |p| p.split "=", 2 }
646
723
  else
647
724
  {}
648
725
  end
@@ -680,7 +757,7 @@ module Google
680
757
 
681
758
  verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb
682
759
  query_string_params = if query_string_params.any?
683
- query_string_params.to_h { |p| p.split("=", 2) }
760
+ query_string_params.to_h { |p| p.split "=", 2 }
684
761
  else
685
762
  {}
686
763
  end
@@ -58,7 +58,7 @@ module Google
58
58
 
59
59
  verb, uri, query_string_params, body = ServiceStub.transcode_list_policies_request request_pb
60
60
  query_string_params = if query_string_params.any?
61
- query_string_params.to_h { |p| p.split("=", 2) }
61
+ query_string_params.to_h { |p| p.split "=", 2 }
62
62
  else
63
63
  {}
64
64
  end
@@ -96,7 +96,7 @@ module Google
96
96
 
97
97
  verb, uri, query_string_params, body = ServiceStub.transcode_get_policy_request request_pb
98
98
  query_string_params = if query_string_params.any?
99
- query_string_params.to_h { |p| p.split("=", 2) }
99
+ query_string_params.to_h { |p| p.split "=", 2 }
100
100
  else
101
101
  {}
102
102
  end
@@ -134,7 +134,7 @@ module Google
134
134
 
135
135
  verb, uri, query_string_params, body = ServiceStub.transcode_create_policy_request request_pb
136
136
  query_string_params = if query_string_params.any?
137
- query_string_params.to_h { |p| p.split("=", 2) }
137
+ query_string_params.to_h { |p| p.split "=", 2 }
138
138
  else
139
139
  {}
140
140
  end
@@ -172,7 +172,7 @@ module Google
172
172
 
173
173
  verb, uri, query_string_params, body = ServiceStub.transcode_update_policy_request request_pb
174
174
  query_string_params = if query_string_params.any?
175
- query_string_params.to_h { |p| p.split("=", 2) }
175
+ query_string_params.to_h { |p| p.split "=", 2 }
176
176
  else
177
177
  {}
178
178
  end
@@ -210,7 +210,7 @@ module Google
210
210
 
211
211
  verb, uri, query_string_params, body = ServiceStub.transcode_delete_policy_request request_pb
212
212
  query_string_params = if query_string_params.any?
213
- query_string_params.to_h { |p| p.split("=", 2) }
213
+ query_string_params.to_h { |p| p.split "=", 2 }
214
214
  else
215
215
  {}
216
216
  end
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Iam
22
22
  module V2
23
- VERSION = "0.3.0"
23
+ VERSION = "0.4.0"
24
24
  end
25
25
  end
26
26
  end
@@ -66,6 +66,20 @@ module Google
66
66
  # a non-empty value will be returned. The user will not be aware of what
67
67
  # non-empty value to expect.
68
68
  NON_EMPTY_DEFAULT = 7
69
+
70
+ # Denotes that the field in a resource (a message annotated with
71
+ # google.api.resource) is used in the resource name to uniquely identify the
72
+ # resource. For AIP-compliant APIs, this should only be applied to the
73
+ # `name` field on the resource.
74
+ #
75
+ # This behavior should not be applied to references to other resources within
76
+ # the message.
77
+ #
78
+ # The identifier field of resources often have different field behavior
79
+ # depending on the request it is embedded in (e.g. for Create methods name
80
+ # is optional and unused, while for Update methods it is required). Instead
81
+ # of method-specific annotations, only `IDENTIFIER` is required.
82
+ IDENTIFIER = 8
69
83
  end
70
84
  end
71
85
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-iam-v2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.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: 2023-05-31 00:00:00.000000000 Z
11
+ date: 2023-09-12 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.19.0
19
+ version: 0.20.0
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.19.0
29
+ version: 0.20.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -217,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
217
217
  - !ruby/object:Gem::Version
218
218
  version: '0'
219
219
  requirements: []
220
- rubygems_version: 3.4.2
220
+ rubygems_version: 3.4.19
221
221
  signing_key:
222
222
  specification_version: 4
223
223
  summary: Manages identity and access control for Google Cloud Platform resources,