google-iam-v1 0.3.beta.1 → 0.3.beta.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0208d232d05d383c20892f9525be07737ea6fd36054f85c88acd5cca7f2f8c3a'
4
- data.tar.gz: f3a9227c16050722e560c02172aee7e3273d1b3a883dc520b8494a50c6597263
3
+ metadata.gz: 82b5591af8a5a0b9428f2c8f136d10418e7434659fdb4ec4f852699c889aecc8
4
+ data.tar.gz: ee7035a864f0282f43c73aa41bd5779840d433a35826e05e979c2b941ff55be1
5
5
  SHA512:
6
- metadata.gz: 2fa9c5d718e270132b34a11b67aacb8c81a64dd134363705fe5228d9041f5e8e37439dccb360174938909881be1ffb44dac29b9fddb1db2c5846c5261563c13b
7
- data.tar.gz: b9d57d064deddeccc5ad0bfd3745fd97b8dbf0695220f47aa7aab0d906c91c50b2e9a9b92c028039b066a6e417c0d5ed7b9b00a2f1045b45be2ac56b9d6f2f1c
6
+ metadata.gz: d11b4cc09c09dcf20d1ee2e605adec53cc6c2af97a1f6e66548af69a5436b0f197bccbe4635c0cfbf6f9e40c93d7a86e469159f5f9f1bb340e3c09ac8c012d63
7
+ data.tar.gz: aab1c24a1c3dc8df6f0e3109a2bb17403eb2a41bb23be83efb23885f0ea0e5cef3461d2ed8d26c6244b53f836a935685e4d5cd0204742962cb118fe35352c95b
@@ -226,7 +226,9 @@ module Google
226
226
  metadata: @config.metadata,
227
227
  retry_policy: @config.retry_policy
228
228
 
229
- @iam_policy_stub.set_iam_policy request, options do |result, response|
229
+ bindings_override = @config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"]
230
+
231
+ @iam_policy_stub.set_iam_policy request, options, bindings_override: bindings_override do |result, response|
230
232
  yield result, response if block_given?
231
233
  return result
232
234
  end
@@ -298,7 +300,9 @@ module Google
298
300
  metadata: @config.metadata,
299
301
  retry_policy: @config.retry_policy
300
302
 
301
- @iam_policy_stub.get_iam_policy request, options do |result, response|
303
+ bindings_override = @config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"]
304
+
305
+ @iam_policy_stub.get_iam_policy request, options, bindings_override: bindings_override do |result, response|
302
306
  yield result, response if block_given?
303
307
  return result
304
308
  end
@@ -376,7 +380,9 @@ module Google
376
380
  metadata: @config.metadata,
377
381
  retry_policy: @config.retry_policy
378
382
 
379
- @iam_policy_stub.test_iam_permissions request, options do |result, response|
383
+ bindings_override = @config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"]
384
+
385
+ @iam_policy_stub.test_iam_permissions request, options, bindings_override: bindings_override do |result, response|
380
386
  yield result, response if block_given?
381
387
  return result
382
388
  end
@@ -474,6 +480,13 @@ module Google
474
480
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
475
481
  config_attr :quota_project, nil, ::String, nil
476
482
 
483
+ # @private
484
+ # Overrides for http bindings for the RPCs of this service
485
+ # are only used when this service is used as mixin, and only
486
+ # by the host service.
487
+ # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
488
+ config_attr :bindings_override, {}, ::Hash, nil
489
+
477
490
  # @private
478
491
  def initialize parent_config = nil
479
492
  @parent_config = parent_config unless parent_config.nil?
@@ -44,6 +44,8 @@ module Google
44
44
  # A request object representing the call parameters. Required.
45
45
  # @param options [::Gapic::CallOptions]
46
46
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
47
+ # @param bindings_override [::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>, nil]
48
+ # Binding overrides for the transcoding. Only used internally.
47
49
  #
48
50
  # @yield [result, response] Access the result along with the Faraday response object
49
51
  # @yieldparam result [::Google::Iam::V1::Policy]
@@ -51,10 +53,10 @@ module Google
51
53
  #
52
54
  # @return [::Google::Iam::V1::Policy]
53
55
  # A result object deserialized from the server's reply
54
- def set_iam_policy request_pb, options = nil
56
+ def set_iam_policy request_pb, options = nil, bindings_override: nil
55
57
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
56
58
 
57
- verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb
59
+ verb, uri, query_string_params, body = ServiceStub.transcode_set_iam_policy_request request_pb, bindings_override: bindings_override
58
60
  query_string_params = if query_string_params.any?
59
61
  query_string_params.to_h { |p| p.split("=", 2) }
60
62
  else
@@ -81,6 +83,8 @@ module Google
81
83
  # A request object representing the call parameters. Required.
82
84
  # @param options [::Gapic::CallOptions]
83
85
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
86
+ # @param bindings_override [::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>, nil]
87
+ # Binding overrides for the transcoding. Only used internally.
84
88
  #
85
89
  # @yield [result, response] Access the result along with the Faraday response object
86
90
  # @yieldparam result [::Google::Iam::V1::Policy]
@@ -88,10 +92,10 @@ module Google
88
92
  #
89
93
  # @return [::Google::Iam::V1::Policy]
90
94
  # A result object deserialized from the server's reply
91
- def get_iam_policy request_pb, options = nil
95
+ def get_iam_policy request_pb, options = nil, bindings_override: nil
92
96
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
93
97
 
94
- verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb
98
+ verb, uri, query_string_params, body = ServiceStub.transcode_get_iam_policy_request request_pb, bindings_override: bindings_override
95
99
  query_string_params = if query_string_params.any?
96
100
  query_string_params.to_h { |p| p.split("=", 2) }
97
101
  else
@@ -118,6 +122,8 @@ module Google
118
122
  # A request object representing the call parameters. Required.
119
123
  # @param options [::Gapic::CallOptions]
120
124
  # Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
125
+ # @param bindings_override [::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>, nil]
126
+ # Binding overrides for the transcoding. Only used internally.
121
127
  #
122
128
  # @yield [result, response] Access the result along with the Faraday response object
123
129
  # @yieldparam result [::Google::Iam::V1::TestIamPermissionsResponse]
@@ -125,10 +131,10 @@ module Google
125
131
  #
126
132
  # @return [::Google::Iam::V1::TestIamPermissionsResponse]
127
133
  # A result object deserialized from the server's reply
128
- def test_iam_permissions request_pb, options = nil
134
+ def test_iam_permissions request_pb, options = nil, bindings_override: nil
129
135
  raise ::ArgumentError, "request must be provided" if request_pb.nil?
130
136
 
131
- verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb
137
+ verb, uri, query_string_params, body = ServiceStub.transcode_test_iam_permissions_request request_pb, bindings_override: bindings_override
132
138
  query_string_params = if query_string_params.any?
133
139
  query_string_params.to_h { |p| p.split("=", 2) }
134
140
  else
@@ -155,18 +161,21 @@ module Google
155
161
  #
156
162
  # @param request_pb [::Google::Iam::V1::SetIamPolicyRequest]
157
163
  # A request object representing the call parameters. Required.
164
+ # @param bindings_override [::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>, nil]
165
+ # Binding overrides for the transcoding.
158
166
  # @return [Array(String, [String, nil], Hash{String => String})]
159
167
  # Uri, Body, Query string parameters
160
- def self.transcode_set_iam_policy_request request_pb
161
- transcoder = Gapic::Rest::GrpcTranscoder.new
162
- .with_bindings(
163
- uri_method: :post,
164
- uri_template: "/v1/{resource}:setIamPolicy",
165
- body: "*",
166
- matches: [
167
- ["resource", %r{^.*$}, true]
168
- ]
169
- )
168
+ def self.transcode_set_iam_policy_request request_pb, bindings_override: nil
169
+ transcoder = Gapic::Rest::GrpcTranscoder.new(bindings_override) if bindings_override
170
+ transcoder ||= Gapic::Rest::GrpcTranscoder.new
171
+ .with_bindings(
172
+ uri_method: :post,
173
+ uri_template: "/v1/{resource}:setIamPolicy",
174
+ body: "*",
175
+ matches: [
176
+ ["resource", %r{^.*$}, true]
177
+ ]
178
+ )
170
179
  transcoder.transcode request_pb
171
180
  end
172
181
 
@@ -177,18 +186,21 @@ module Google
177
186
  #
178
187
  # @param request_pb [::Google::Iam::V1::GetIamPolicyRequest]
179
188
  # A request object representing the call parameters. Required.
189
+ # @param bindings_override [::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>, nil]
190
+ # Binding overrides for the transcoding.
180
191
  # @return [Array(String, [String, nil], Hash{String => String})]
181
192
  # Uri, Body, Query string parameters
182
- def self.transcode_get_iam_policy_request request_pb
183
- transcoder = Gapic::Rest::GrpcTranscoder.new
184
- .with_bindings(
185
- uri_method: :post,
186
- uri_template: "/v1/{resource}:getIamPolicy",
187
- body: "*",
188
- matches: [
189
- ["resource", %r{^.*$}, true]
190
- ]
191
- )
193
+ def self.transcode_get_iam_policy_request request_pb, bindings_override: nil
194
+ transcoder = Gapic::Rest::GrpcTranscoder.new(bindings_override) if bindings_override
195
+ transcoder ||= Gapic::Rest::GrpcTranscoder.new
196
+ .with_bindings(
197
+ uri_method: :post,
198
+ uri_template: "/v1/{resource}:getIamPolicy",
199
+ body: "*",
200
+ matches: [
201
+ ["resource", %r{^.*$}, true]
202
+ ]
203
+ )
192
204
  transcoder.transcode request_pb
193
205
  end
194
206
 
@@ -199,18 +211,21 @@ module Google
199
211
  #
200
212
  # @param request_pb [::Google::Iam::V1::TestIamPermissionsRequest]
201
213
  # A request object representing the call parameters. Required.
214
+ # @param bindings_override [::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>, nil]
215
+ # Binding overrides for the transcoding.
202
216
  # @return [Array(String, [String, nil], Hash{String => String})]
203
217
  # Uri, Body, Query string parameters
204
- def self.transcode_test_iam_permissions_request request_pb
205
- transcoder = Gapic::Rest::GrpcTranscoder.new
206
- .with_bindings(
207
- uri_method: :post,
208
- uri_template: "/v1/{resource}:testIamPermissions",
209
- body: "*",
210
- matches: [
211
- ["resource", %r{^.*$}, true]
212
- ]
213
- )
218
+ def self.transcode_test_iam_permissions_request request_pb, bindings_override: nil
219
+ transcoder = Gapic::Rest::GrpcTranscoder.new(bindings_override) if bindings_override
220
+ transcoder ||= Gapic::Rest::GrpcTranscoder.new
221
+ .with_bindings(
222
+ uri_method: :post,
223
+ uri_template: "/v1/{resource}:testIamPermissions",
224
+ body: "*",
225
+ matches: [
226
+ ["resource", %r{^.*$}, true]
227
+ ]
228
+ )
214
229
  transcoder.transcode request_pb
215
230
  end
216
231
  end
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Iam
22
22
  module V1
23
- VERSION = "0.3.beta.1"
23
+ VERSION = "0.3.beta.2"
24
24
  end
25
25
  end
26
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-iam-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.beta.1
4
+ version: 0.3.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-08 00:00:00.000000000 Z
11
+ date: 2022-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common