google-iam-v1 0.8.0 → 1.2.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: 7a1149d93c1da63fa0403e1a82cac559aaf07349557c2d3b34d7cce21e681729
4
- data.tar.gz: 3d6ff775d6ac05259981c22eb5fa82d72c0949811cf4aa78bc6b55b9870a7952
3
+ metadata.gz: 59f20a075f2106b81075d3074ba2f5547621c5f6c5af6018a0719b7c9f89b05a
4
+ data.tar.gz: 2bc0c0042a325abf8d47bc0d4fadae5ab1fbb881404ded6f2bf4626da8bc394d
5
5
  SHA512:
6
- metadata.gz: b5d08ed487b73a43be92734fa9f1bd46710e132ce81e735c1816dcae7d9e6cd38b863250c6cbc6d4e4ec6bd330802f02ad09c8b878b3b801296a246d8318a697
7
- data.tar.gz: b3edd38f2096b804f27891785271144300587e95e09daf2e5b3ceb3b092515452b9342146a1afe74f30af1a24b6735670c5d4c7dea81c90a16efc9e8ba549937
6
+ metadata.gz: 2b359ba5e21f4ee48b1d3267cda5f3938875f0ca5d6d8d8d62ff19df5172a1eecc49cbba1781d86afbaa3e5cb7ba25926e745cb2501e11fdac20b7cdcc2326ac
7
+ data.tar.gz: 6db0e013f678e6696bac7871748a6965f99c3ac80a6c5a3c3711e55979c0fbe773ba322491c6c9e14b9e23c7eea8cb6700ca0ae9df09fe85af133a9f714488e9
@@ -28,7 +28,6 @@ module Google
28
28
  #
29
29
  # API Overview
30
30
  #
31
- #
32
31
  # Manages Identity and Access Management (IAM) policies.
33
32
  #
34
33
  # Any implementation of an API that offers access control features
@@ -54,6 +53,9 @@ module Google
54
53
  # attached.
55
54
  #
56
55
  class Client
56
+ # @private
57
+ API_VERSION = ""
58
+
57
59
  # @private
58
60
  DEFAULT_ENDPOINT_TEMPLATE = "iam-meta-api.$UNIVERSE_DOMAIN$"
59
61
 
@@ -176,8 +178,28 @@ module Google
176
178
  universe_domain: @config.universe_domain,
177
179
  channel_args: @config.channel_args,
178
180
  interceptors: @config.interceptors,
179
- channel_pool_config: @config.channel_pool
181
+ channel_pool_config: @config.channel_pool,
182
+ logger: @config.logger
180
183
  )
184
+
185
+ @iam_policy_stub.stub_logger&.info do |entry|
186
+ entry.set_system_name
187
+ entry.set_service
188
+ entry.message = "Created client for #{entry.service}"
189
+ entry.set_credentials_fields credentials
190
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
191
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
192
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
193
+ end
194
+ end
195
+
196
+ ##
197
+ # The logger used for request/response debug logging.
198
+ #
199
+ # @return [Logger]
200
+ #
201
+ def logger
202
+ @iam_policy_stub.logger
181
203
  end
182
204
 
183
205
  # Service calls
@@ -252,10 +274,11 @@ module Google
252
274
  # Customize the options with defaults
253
275
  metadata = @config.rpcs.set_iam_policy.metadata.to_h
254
276
 
255
- # Set x-goog-api-client and x-goog-user-project headers
277
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
256
278
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
257
279
  lib_name: @config.lib_name, lib_version: @config.lib_version,
258
280
  gapic_version: ::Google::Iam::V1::VERSION
281
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
259
282
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
260
283
 
261
284
  header_params = {}
@@ -276,7 +299,6 @@ module Google
276
299
 
277
300
  @iam_policy_stub.call_rpc :set_iam_policy, request, options: options do |response, operation|
278
301
  yield response, operation if block_given?
279
- return response
280
302
  end
281
303
  rescue ::GRPC::BadStatus => e
282
304
  raise ::Google::Cloud::Error.from_error(e)
@@ -343,10 +365,11 @@ module Google
343
365
  # Customize the options with defaults
344
366
  metadata = @config.rpcs.get_iam_policy.metadata.to_h
345
367
 
346
- # Set x-goog-api-client and x-goog-user-project headers
368
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
347
369
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
348
370
  lib_name: @config.lib_name, lib_version: @config.lib_version,
349
371
  gapic_version: ::Google::Iam::V1::VERSION
372
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
350
373
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
351
374
 
352
375
  header_params = {}
@@ -367,7 +390,6 @@ module Google
367
390
 
368
391
  @iam_policy_stub.call_rpc :get_iam_policy, request, options: options do |response, operation|
369
392
  yield response, operation if block_given?
370
- return response
371
393
  end
372
394
  rescue ::GRPC::BadStatus => e
373
395
  raise ::Google::Cloud::Error.from_error(e)
@@ -440,10 +462,11 @@ module Google
440
462
  # Customize the options with defaults
441
463
  metadata = @config.rpcs.test_iam_permissions.metadata.to_h
442
464
 
443
- # Set x-goog-api-client and x-goog-user-project headers
465
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
444
466
  metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
445
467
  lib_name: @config.lib_name, lib_version: @config.lib_version,
446
468
  gapic_version: ::Google::Iam::V1::VERSION
469
+ metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
447
470
  metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
448
471
 
449
472
  header_params = {}
@@ -464,7 +487,6 @@ module Google
464
487
 
465
488
  @iam_policy_stub.call_rpc :test_iam_permissions, request, options: options do |response, operation|
466
489
  yield response, operation if block_given?
467
- return response
468
490
  end
469
491
  rescue ::GRPC::BadStatus => e
470
492
  raise ::Google::Cloud::Error.from_error(e)
@@ -553,6 +575,11 @@ module Google
553
575
  # default endpoint URL. The default value of nil uses the environment
554
576
  # universe (usually the default "googleapis.com" universe).
555
577
  # @return [::String,nil]
578
+ # @!attribute [rw] logger
579
+ # A custom logger to use for request/response debug logging, or the value
580
+ # `:default` (the default) to construct a default logger, or `nil` to
581
+ # explicitly disable logging.
582
+ # @return [::Logger,:default,nil]
556
583
  #
557
584
  class Configuration
558
585
  extend ::Gapic::Config
@@ -577,6 +604,7 @@ module Google
577
604
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
578
605
  config_attr :quota_project, nil, ::String, nil
579
606
  config_attr :universe_domain, nil, ::String, nil
607
+ config_attr :logger, :default, ::Logger, nil, :default
580
608
 
581
609
  # @private
582
610
  def initialize parent_config = nil
@@ -30,7 +30,6 @@ module Google
30
30
  #
31
31
  # API Overview
32
32
  #
33
- #
34
33
  # Manages Identity and Access Management (IAM) policies.
35
34
  #
36
35
  # Any implementation of an API that offers access control features
@@ -56,6 +55,9 @@ module Google
56
55
  # attached.
57
56
  #
58
57
  class Client
58
+ # @private
59
+ API_VERSION = ""
60
+
59
61
  # @private
60
62
  DEFAULT_ENDPOINT_TEMPLATE = "iam-meta-api.$UNIVERSE_DOMAIN$"
61
63
 
@@ -169,8 +171,28 @@ module Google
169
171
  endpoint: @config.endpoint,
170
172
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
171
173
  universe_domain: @config.universe_domain,
172
- credentials: credentials
174
+ credentials: credentials,
175
+ logger: @config.logger
173
176
  )
177
+
178
+ @iam_policy_stub.logger(stub: true)&.info do |entry|
179
+ entry.set_system_name
180
+ entry.set_service
181
+ entry.message = "Created client for #{entry.service}"
182
+ entry.set_credentials_fields credentials
183
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
184
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
185
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
186
+ end
187
+ end
188
+
189
+ ##
190
+ # The logger used for request/response debug logging.
191
+ #
192
+ # @return [Logger]
193
+ #
194
+ def logger
195
+ @iam_policy_stub.logger
174
196
  end
175
197
 
176
198
  # Service calls
@@ -244,12 +266,13 @@ module Google
244
266
  # Customize the options with defaults
245
267
  call_metadata = @config.rpcs.set_iam_policy.metadata.to_h
246
268
 
247
- # Set x-goog-api-client and x-goog-user-project headers
269
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
248
270
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
249
271
  lib_name: @config.lib_name, lib_version: @config.lib_version,
250
272
  gapic_version: ::Google::Iam::V1::VERSION,
251
273
  transports_version_send: [:rest]
252
274
 
275
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
253
276
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
254
277
 
255
278
  options.apply_defaults timeout: @config.rpcs.set_iam_policy.timeout,
@@ -264,7 +287,6 @@ module Google
264
287
 
265
288
  @iam_policy_stub.set_iam_policy request, options, bindings_override: bindings_override do |result, operation|
266
289
  yield result, operation if block_given?
267
- return result
268
290
  end
269
291
  rescue ::Gapic::Rest::Error => e
270
292
  raise ::Google::Cloud::Error.from_error(e)
@@ -330,12 +352,13 @@ module Google
330
352
  # Customize the options with defaults
331
353
  call_metadata = @config.rpcs.get_iam_policy.metadata.to_h
332
354
 
333
- # Set x-goog-api-client and x-goog-user-project headers
355
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
334
356
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
335
357
  lib_name: @config.lib_name, lib_version: @config.lib_version,
336
358
  gapic_version: ::Google::Iam::V1::VERSION,
337
359
  transports_version_send: [:rest]
338
360
 
361
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
339
362
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
340
363
 
341
364
  options.apply_defaults timeout: @config.rpcs.get_iam_policy.timeout,
@@ -350,7 +373,6 @@ module Google
350
373
 
351
374
  @iam_policy_stub.get_iam_policy request, options, bindings_override: bindings_override do |result, operation|
352
375
  yield result, operation if block_given?
353
- return result
354
376
  end
355
377
  rescue ::Gapic::Rest::Error => e
356
378
  raise ::Google::Cloud::Error.from_error(e)
@@ -422,12 +444,13 @@ module Google
422
444
  # Customize the options with defaults
423
445
  call_metadata = @config.rpcs.test_iam_permissions.metadata.to_h
424
446
 
425
- # Set x-goog-api-client and x-goog-user-project headers
447
+ # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
426
448
  call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
427
449
  lib_name: @config.lib_name, lib_version: @config.lib_version,
428
450
  gapic_version: ::Google::Iam::V1::VERSION,
429
451
  transports_version_send: [:rest]
430
452
 
453
+ call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
431
454
  call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
432
455
 
433
456
  options.apply_defaults timeout: @config.rpcs.test_iam_permissions.timeout,
@@ -442,7 +465,6 @@ module Google
442
465
 
443
466
  @iam_policy_stub.test_iam_permissions request, options, bindings_override: bindings_override do |result, operation|
444
467
  yield result, operation if block_given?
445
- return result
446
468
  end
447
469
  rescue ::Gapic::Rest::Error => e
448
470
  raise ::Google::Cloud::Error.from_error(e)
@@ -522,6 +544,11 @@ module Google
522
544
  # default endpoint URL. The default value of nil uses the environment
523
545
  # universe (usually the default "googleapis.com" universe).
524
546
  # @return [::String,nil]
547
+ # @!attribute [rw] logger
548
+ # A custom logger to use for request/response debug logging, or the value
549
+ # `:default` (the default) to construct a default logger, or `nil` to
550
+ # explicitly disable logging.
551
+ # @return [::Logger,:default,nil]
525
552
  #
526
553
  class Configuration
527
554
  extend ::Gapic::Config
@@ -550,6 +577,7 @@ module Google
550
577
  # by the host service.
551
578
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
552
579
  config_attr :bindings_override, {}, ::Hash, nil
580
+ config_attr :logger, :default, ::Logger, nil, :default
553
581
 
554
582
  # @private
555
583
  def initialize parent_config = nil
@@ -29,7 +29,8 @@ module Google
29
29
  # including transcoding, making the REST call, and deserialing the response.
30
30
  #
31
31
  class ServiceStub
32
- def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
32
+ # @private
33
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
33
34
  # These require statements are intentionally placed here to initialize
34
35
  # the REST modules only when it's required.
35
36
  require "gapic/rest"
@@ -39,7 +40,9 @@ module Google
39
40
  universe_domain: universe_domain,
40
41
  credentials: credentials,
41
42
  numeric_enums: false,
42
- raise_faraday_errors: false
43
+ service_name: self.class,
44
+ raise_faraday_errors: false,
45
+ logger: logger
43
46
  end
44
47
 
45
48
  ##
@@ -60,6 +63,15 @@ module Google
60
63
  @client_stub.endpoint
61
64
  end
62
65
 
66
+ ##
67
+ # The logger used for request/response debug logging.
68
+ #
69
+ # @return [Logger]
70
+ #
71
+ def logger stub: false
72
+ stub ? @client_stub.stub_logger : @client_stub.logger
73
+ end
74
+
63
75
  ##
64
76
  # Baseline implementation for the set_iam_policy REST call
65
77
  #
@@ -88,16 +100,18 @@ module Google
88
100
 
89
101
  response = @client_stub.make_http_request(
90
102
  verb,
91
- uri: uri,
92
- body: body || "",
93
- params: query_string_params,
103
+ uri: uri,
104
+ body: body || "",
105
+ params: query_string_params,
106
+ method_name: "set_iam_policy",
94
107
  options: options
95
108
  )
96
109
  operation = ::Gapic::Rest::TransportOperation.new response
97
110
  result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
98
-
99
- yield result, operation if block_given?
100
- result
111
+ catch :response do
112
+ yield result, operation if block_given?
113
+ result
114
+ end
101
115
  end
102
116
 
103
117
  ##
@@ -128,16 +142,18 @@ module Google
128
142
 
129
143
  response = @client_stub.make_http_request(
130
144
  verb,
131
- uri: uri,
132
- body: body || "",
133
- params: query_string_params,
145
+ uri: uri,
146
+ body: body || "",
147
+ params: query_string_params,
148
+ method_name: "get_iam_policy",
134
149
  options: options
135
150
  )
136
151
  operation = ::Gapic::Rest::TransportOperation.new response
137
152
  result = ::Google::Iam::V1::Policy.decode_json response.body, ignore_unknown_fields: true
138
-
139
- yield result, operation if block_given?
140
- result
153
+ catch :response do
154
+ yield result, operation if block_given?
155
+ result
156
+ end
141
157
  end
142
158
 
143
159
  ##
@@ -168,16 +184,18 @@ module Google
168
184
 
169
185
  response = @client_stub.make_http_request(
170
186
  verb,
171
- uri: uri,
172
- body: body || "",
173
- params: query_string_params,
187
+ uri: uri,
188
+ body: body || "",
189
+ params: query_string_params,
190
+ method_name: "test_iam_permissions",
174
191
  options: options
175
192
  )
176
193
  operation = ::Gapic::Rest::TransportOperation.new response
177
194
  result = ::Google::Iam::V1::TestIamPermissionsResponse.decode_json response.body, ignore_unknown_fields: true
178
-
179
- yield result, operation if block_given?
180
- result
195
+ catch :response do
196
+ yield result, operation if block_given?
197
+ result
198
+ end
181
199
  end
182
200
 
183
201
  ##
@@ -31,7 +31,6 @@ module Google
31
31
  ##
32
32
  # API Overview
33
33
  #
34
- #
35
34
  # Manages Identity and Access Management (IAM) policies.
36
35
  #
37
36
  # Any implementation of an API that offers access control features
@@ -32,7 +32,6 @@ module Google
32
32
  ##
33
33
  # API Overview
34
34
  #
35
- #
36
35
  # Manages Identity and Access Management (IAM) policies.
37
36
  #
38
37
  # Any implementation of an API that offers access control features
@@ -13,7 +13,7 @@ require 'google/iam/v1/policy_pb'
13
13
  require 'google/protobuf/field_mask_pb'
14
14
 
15
15
 
16
- descriptor_data = "\n\x1egoogle/iam/v1/iam_policy.proto\x12\rgoogle.iam.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/iam/v1/options.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a google/protobuf/field_mask.proto\"\x8f\x01\n\x13SetIamPolicyRequest\x12\x1b\n\x08resource\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12*\n\x06policy\x18\x02 \x01(\x0b\x32\x15.google.iam.v1.PolicyB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"d\n\x13GetIamPolicyRequest\x12\x1b\n\x08resource\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x30\n\x07options\x18\x02 \x01(\x0b\x32\x1f.google.iam.v1.GetPolicyOptions\"R\n\x19TestIamPermissionsRequest\x12\x1b\n\x08resource\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x18\n\x0bpermissions\x18\x02 \x03(\tB\x03\xe0\x41\x02\"1\n\x1aTestIamPermissionsResponse\x12\x13\n\x0bpermissions\x18\x01 \x03(\t2\xb4\x03\n\tIAMPolicy\x12t\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\")\x82\xd3\xe4\x93\x02#\"\x1e/v1/{resource=**}:setIamPolicy:\x01*\x12t\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\")\x82\xd3\xe4\x93\x02#\"\x1e/v1/{resource=**}:getIamPolicy:\x01*\x12\x9a\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"/\x82\xd3\xe4\x93\x02)\"$/v1/{resource=**}:testIamPermissions:\x01*\x1a\x1e\xca\x41\x1biam-meta-api.googleapis.comB\x7f\n\x11\x63om.google.iam.v1B\x0eIamPolicyProtoP\x01Z)cloud.google.com/go/iam/apiv1/iampb;iampb\xf8\x01\x01\xaa\x02\x13Google.Cloud.Iam.V1\xca\x02\x13Google\\Cloud\\Iam\\V1b\x06proto3"
16
+ descriptor_data = "\n\x1egoogle/iam/v1/iam_policy.proto\x12\rgoogle.iam.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1bgoogle/iam/v1/options.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a google/protobuf/field_mask.proto\"\x8f\x01\n\x13SetIamPolicyRequest\x12\x1b\n\x08resource\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12*\n\x06policy\x18\x02 \x01(\x0b\x32\x15.google.iam.v1.PolicyB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"d\n\x13GetIamPolicyRequest\x12\x1b\n\x08resource\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x30\n\x07options\x18\x02 \x01(\x0b\x32\x1f.google.iam.v1.GetPolicyOptions\"R\n\x19TestIamPermissionsRequest\x12\x1b\n\x08resource\x18\x01 \x01(\tB\t\xe0\x41\x02\xfa\x41\x03\n\x01*\x12\x18\n\x0bpermissions\x18\x02 \x03(\tB\x03\xe0\x41\x02\"1\n\x1aTestIamPermissionsResponse\x12\x13\n\x0bpermissions\x18\x01 \x03(\t2\xb4\x03\n\tIAMPolicy\x12t\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\")\x82\xd3\xe4\x93\x02#\"\x1e/v1/{resource=**}:setIamPolicy:\x01*\x12t\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\")\x82\xd3\xe4\x93\x02#\"\x1e/v1/{resource=**}:getIamPolicy:\x01*\x12\x9a\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"/\x82\xd3\xe4\x93\x02)\"$/v1/{resource=**}:testIamPermissions:\x01*\x1a\x1e\xca\x41\x1biam-meta-api.googleapis.comB|\n\x11\x63om.google.iam.v1B\x0eIamPolicyProtoP\x01Z)cloud.google.com/go/iam/apiv1/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V1\xca\x02\x13Google\\Cloud\\Iam\\V1b\x06proto3"
17
17
 
18
18
  pool = Google::Protobuf::DescriptorPool.generated_pool
19
19
 
@@ -25,7 +25,6 @@ module Google
25
25
  module IAMPolicy
26
26
  # API Overview
27
27
  #
28
- #
29
28
  # Manages Identity and Access Management (IAM) policies.
30
29
  #
31
30
  # Any implementation of an API that offers access control features
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: google/iam/v1/resource_policy_member.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+ require 'google/api/field_behavior_pb'
8
+
9
+
10
+ descriptor_data = "\n*google/iam/v1/resource_policy_member.proto\x12\rgoogle.iam.v1\x1a\x1fgoogle/api/field_behavior.proto\"e\n\x14ResourcePolicyMember\x12&\n\x19iam_policy_name_principal\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12%\n\x18iam_policy_uid_principal\x18\x02 \x01(\tB\x03\xe0\x41\x03\x42\x87\x01\n\x11\x63om.google.iam.v1B\x19ResourcePolicyMemberProtoP\x01Z)cloud.google.com/go/iam/apiv1/iampb;iampb\xaa\x02\x13Google.Cloud.Iam.V1\xca\x02\x13Google\\Cloud\\Iam\\V1b\x06proto3"
11
+
12
+ pool = Google::Protobuf::DescriptorPool.generated_pool
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ]
26
+ imports.each do |type_name, expected_filename|
27
+ import_file = pool.lookup(type_name).file_descriptor
28
+ if import_file.name != expected_filename
29
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
30
+ end
31
+ end
32
+ warn "Each proto file must use a consistent fully-qualified name."
33
+ warn "This will become an error in the next major version."
34
+ end
35
+
36
+ module Google
37
+ module Iam
38
+ module V1
39
+ ResourcePolicyMember = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.v1.ResourcePolicyMember").msgclass
40
+ end
41
+ end
42
+ end
@@ -20,7 +20,7 @@
20
20
  module Google
21
21
  module Iam
22
22
  module V1
23
- VERSION = "0.8.0"
23
+ VERSION = "1.2.0"
24
24
  end
25
25
  end
26
26
  end
@@ -28,6 +28,9 @@ module Google
28
28
  # @!attribute [rw] destinations
29
29
  # @return [::Array<::Google::Api::ClientLibraryDestination>]
30
30
  # The destination where API teams want this client library to be published.
31
+ # @!attribute [rw] selective_gapic_generation
32
+ # @return [::Google::Api::SelectiveGapicGeneration]
33
+ # Configuration for which RPCs should be generated in the GAPIC client.
31
34
  class CommonLanguageSettings
32
35
  include ::Google::Protobuf::MessageExts
33
36
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -118,6 +121,10 @@ module Google
118
121
  # @return [::String]
119
122
  # Optional link to proto reference documentation. Example:
120
123
  # https://cloud.google.com/pubsub/lite/docs/reference/rpc
124
+ # @!attribute [rw] rest_reference_documentation_uri
125
+ # @return [::String]
126
+ # Optional link to REST reference documentation. Example:
127
+ # https://cloud.google.com/pubsub/lite/docs/reference/rest
121
128
  class Publishing
122
129
  include ::Google::Protobuf::MessageExts
123
130
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -192,9 +199,32 @@ module Google
192
199
  # @!attribute [rw] common
193
200
  # @return [::Google::Api::CommonLanguageSettings]
194
201
  # Some settings.
202
+ # @!attribute [rw] experimental_features
203
+ # @return [::Google::Api::PythonSettings::ExperimentalFeatures]
204
+ # Experimental features to be included during client library generation.
195
205
  class PythonSettings
196
206
  include ::Google::Protobuf::MessageExts
197
207
  extend ::Google::Protobuf::MessageExts::ClassMethods
208
+
209
+ # Experimental features to be included during client library generation.
210
+ # These fields will be deprecated once the feature graduates and is enabled
211
+ # by default.
212
+ # @!attribute [rw] rest_async_io_enabled
213
+ # @return [::Boolean]
214
+ # Enables generation of asynchronous REST clients if `rest` transport is
215
+ # enabled. By default, asynchronous REST clients will not be generated.
216
+ # This feature will be enabled by default 1 month after launching the
217
+ # feature in preview packages.
218
+ # @!attribute [rw] protobuf_pythonic_types_enabled
219
+ # @return [::Boolean]
220
+ # Enables generation of protobuf code using new types that are more
221
+ # Pythonic which are included in `protobuf>=5.29.x`. This feature will be
222
+ # enabled by default 1 month after launching the feature in preview
223
+ # packages.
224
+ class ExperimentalFeatures
225
+ include ::Google::Protobuf::MessageExts
226
+ extend ::Google::Protobuf::MessageExts::ClassMethods
227
+ end
198
228
  end
199
229
 
200
230
  # Settings for Node client libraries.
@@ -276,9 +306,28 @@ module Google
276
306
  # @!attribute [rw] common
277
307
  # @return [::Google::Api::CommonLanguageSettings]
278
308
  # Some settings.
309
+ # @!attribute [rw] renamed_services
310
+ # @return [::Google::Protobuf::Map{::String => ::String}]
311
+ # Map of service names to renamed services. Keys are the package relative
312
+ # service names and values are the name to be used for the service client
313
+ # and call options.
314
+ #
315
+ # publishing:
316
+ # go_settings:
317
+ # renamed_services:
318
+ # Publisher: TopicAdmin
279
319
  class GoSettings
280
320
  include ::Google::Protobuf::MessageExts
281
321
  extend ::Google::Protobuf::MessageExts::ClassMethods
322
+
323
+ # @!attribute [rw] key
324
+ # @return [::String]
325
+ # @!attribute [rw] value
326
+ # @return [::String]
327
+ class RenamedServicesEntry
328
+ include ::Google::Protobuf::MessageExts
329
+ extend ::Google::Protobuf::MessageExts::ClassMethods
330
+ end
282
331
  end
283
332
 
284
333
  # Describes the generator configuration for a method.
@@ -286,6 +335,13 @@ module Google
286
335
  # @return [::String]
287
336
  # The fully qualified name of the method, for which the options below apply.
288
337
  # This is used to find the method to apply the options.
338
+ #
339
+ # Example:
340
+ #
341
+ # publishing:
342
+ # method_settings:
343
+ # - selector: google.storage.control.v2.StorageControl.CreateFolder
344
+ # # method settings for CreateFolder...
289
345
  # @!attribute [rw] long_running
290
346
  # @return [::Google::Api::MethodSettings::LongRunning]
291
347
  # Describes settings to use for long-running operations when generating
@@ -294,17 +350,14 @@ module Google
294
350
  #
295
351
  # Example of a YAML configuration::
296
352
  #
297
- # publishing:
298
- # method_settings:
353
+ # publishing:
354
+ # method_settings:
299
355
  # - selector: google.cloud.speech.v2.Speech.BatchRecognize
300
356
  # long_running:
301
- # initial_poll_delay:
302
- # seconds: 60 # 1 minute
357
+ # initial_poll_delay: 60s # 1 minute
303
358
  # poll_delay_multiplier: 1.5
304
- # max_poll_delay:
305
- # seconds: 360 # 6 minutes
306
- # total_poll_timeout:
307
- # seconds: 54000 # 90 minutes
359
+ # max_poll_delay: 360s # 6 minutes
360
+ # total_poll_timeout: 54000s # 90 minutes
308
361
  # @!attribute [rw] auto_populated_fields
309
362
  # @return [::Array<::String>]
310
363
  # List of top-level fields of the request message, that should be
@@ -313,8 +366,8 @@ module Google
313
366
  #
314
367
  # Example of a YAML configuration:
315
368
  #
316
- # publishing:
317
- # method_settings:
369
+ # publishing:
370
+ # method_settings:
318
371
  # - selector: google.example.v1.ExampleService.CreateExample
319
372
  # auto_populated_fields:
320
373
  # - request_id
@@ -350,6 +403,17 @@ module Google
350
403
  end
351
404
  end
352
405
 
406
+ # This message is used to configure the generation of a subset of the RPCs in
407
+ # a service for client libraries.
408
+ # @!attribute [rw] methods
409
+ # @return [::Array<::String>]
410
+ # An allowlist of the fully qualified names of RPCs that should be included
411
+ # on public client surfaces.
412
+ class SelectiveGapicGeneration
413
+ include ::Google::Protobuf::MessageExts
414
+ extend ::Google::Protobuf::MessageExts::ClassMethods
415
+ end
416
+
353
417
  # The organization for which the client libraries are being published.
354
418
  # Affects the url where generated docs are published, etc.
355
419
  module ClientLibraryOrganization
@@ -124,8 +124,13 @@ module Google
124
124
  # @return [::String]
125
125
  # The plural name used in the resource name and permission names, such as
126
126
  # 'projects' for the resource name of 'projects/\\{project}' and the permission
127
- # name of 'cloudresourcemanager.googleapis.com/projects.get'. It is the same
128
- # concept of the `plural` field in k8s CRD spec
127
+ # name of 'cloudresourcemanager.googleapis.com/projects.get'. One exception
128
+ # to this is for Nested Collections that have stuttering names, as defined
129
+ # in [AIP-122](https://google.aip.dev/122#nested-collections), where the
130
+ # collection ID in the resource name pattern does not necessarily directly
131
+ # match the `plural` value.
132
+ #
133
+ # It is the same concept of the `plural` field in k8s CRD spec
129
134
  # https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
130
135
  #
131
136
  # Note: The plural form is required even for singleton resources. See
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Iam
22
+ module V1
23
+ # Output-only policy member strings of a Google Cloud resource's built-in
24
+ # identity.
25
+ # @!attribute [r] iam_policy_name_principal
26
+ # @return [::String]
27
+ # IAM policy binding member referring to a Google Cloud resource by
28
+ # user-assigned name (https://google.aip.dev/122). If a resource is deleted
29
+ # and recreated with the same name, the binding will be applicable to the new
30
+ # resource.
31
+ #
32
+ # Example:
33
+ # `principal://parametermanager.googleapis.com/projects/12345/name/locations/us-central1-a/parameters/my-parameter`
34
+ # @!attribute [r] iam_policy_uid_principal
35
+ # @return [::String]
36
+ # IAM policy binding member referring to a Google Cloud resource by
37
+ # system-assigned unique identifier (https://google.aip.dev/148#uid). If a
38
+ # resource is deleted and recreated with the same name, the binding will not
39
+ # be applicable to the new resource
40
+ #
41
+ # Example:
42
+ # `principal://parametermanager.googleapis.com/projects/12345/uid/locations/us-central1-a/parameters/a918fed5`
43
+ class ResourcePolicyMember
44
+ include ::Google::Protobuf::MessageExts
45
+ extend ::Google::Protobuf::MessageExts::ClassMethods
46
+ end
47
+ end
48
+ end
49
+ 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.8.0
4
+ version: 1.2.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: 2024-02-26 00:00:00.000000000 Z
11
+ date: 2024-12-10 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.21.1
19
+ version: 0.24.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.21.1
29
+ version: 0.24.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.a
@@ -83,6 +83,7 @@ files:
83
83
  - lib/google/iam/v1/logging/audit_data_pb.rb
84
84
  - lib/google/iam/v1/options_pb.rb
85
85
  - lib/google/iam/v1/policy_pb.rb
86
+ - lib/google/iam/v1/resource_policy_member_pb.rb
86
87
  - lib/google/iam/v1/rest.rb
87
88
  - lib/google/iam/v1/version.rb
88
89
  - proto_docs/README.md
@@ -93,6 +94,7 @@ files:
93
94
  - proto_docs/google/iam/v1/iam_policy.rb
94
95
  - proto_docs/google/iam/v1/options.rb
95
96
  - proto_docs/google/iam/v1/policy.rb
97
+ - proto_docs/google/iam/v1/resource_policy_member.rb
96
98
  - proto_docs/google/protobuf/duration.rb
97
99
  - proto_docs/google/protobuf/field_mask.rb
98
100
  - proto_docs/google/type/expr.rb
@@ -115,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
117
  - !ruby/object:Gem::Version
116
118
  version: '0'
117
119
  requirements: []
118
- rubygems_version: 3.5.6
120
+ rubygems_version: 3.5.23
119
121
  signing_key:
120
122
  specification_version: 4
121
123
  summary: Manages access control for Google Cloud Platform resources.