google-cloud-managed_kafka-v1 0.2.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: 1368d318c076a048cb519fb03bd38e603b17917dcae6fba986250f818bd2a3d7
4
- data.tar.gz: e23f9a22c7a6df14761ecf4ca2539619e9e9cce3e7223c8ab42ecf71ad47830d
3
+ metadata.gz: 94cf5582890ef3384944bb915f13b5a09d28034b8180e49cfad9a1d348ea9d61
4
+ data.tar.gz: a6aafbe148cc7b63d4c42477fa9ea9025b9f911eeac629b28e5b219d47f1e584
5
5
  SHA512:
6
- metadata.gz: ed412345ed41d114c78132b1019ccce5e7771ac1ffd4cb19bc87589d16c65e492cd4888e8a142f16bd7a00d5a81ea96059f1287ed967812e19cbaaab62d26307
7
- data.tar.gz: f6a8a6d8e0aed81011a0d5994fd6f73c4c2fc462f0cc8687c3ef8d1da8ccf4c1e501527ce9dba02f3895a7cd6bcc5f9ab639d81af1a9068a7020ad952625d063
6
+ metadata.gz: 3c7e76643ffd672a6369a37ee7462613fab9d5883f3de5c8c20413be766d8bebbecbf793d2db203edaaff055e3b7362f9257ae295ef95c6d5d3545723425b040
7
+ data.tar.gz: '08d52c733d24b8ca80bebbbc843d58604197349c3365aa06117bfcd19c15dafff0d40a9614f9b7786f49811afc2ce33bded236f0dac8d9a10f826557e2e302a6'
data/README.md CHANGED
@@ -42,33 +42,43 @@ for class and method documentation.
42
42
  See also the [Product Documentation](https://cloud.google.com/managed-service-for-apache-kafka/docs)
43
43
  for general usage information.
44
44
 
45
- ## Enabling Logging
46
-
47
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
48
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
49
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
50
- that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
51
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
52
-
53
- Configuring a Ruby stdlib logger:
45
+ ## Debug Logging
46
+
47
+ This library comes with opt-in Debug Logging that can help you troubleshoot
48
+ your application's integration with the API. When logging is activated, key
49
+ events such as requests and responses, along with data payloads and metadata
50
+ such as headers and client configuration, are logged to the standard error
51
+ stream.
52
+
53
+ **WARNING:** Client Library Debug Logging includes your data payloads in
54
+ plaintext, which could include sensitive data such as PII for yourself or your
55
+ customers, private keys, or other security data that could be compromising if
56
+ leaked. Always practice good data hygiene with your application logs, and follow
57
+ the principle of least access. Google also recommends that Client Library Debug
58
+ Logging be enabled only temporarily during active debugging, and not used
59
+ permanently in production.
60
+
61
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
62
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
63
+ list of client library gem names. This will select the default logging behavior,
64
+ which writes logs to the standard error stream. On a local workstation, this may
65
+ result in logs appearing on the console. When running on a Google Cloud hosting
66
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
67
+ results in logs appearing alongside your application logs in the
68
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
69
+
70
+ You can customize logging by modifying the `logger` configuration when
71
+ constructing a client object. For example:
54
72
 
55
73
  ```ruby
74
+ require "google/cloud/managed_kafka/v1"
56
75
  require "logger"
57
76
 
58
- module MyLogger
59
- LOGGER = Logger.new $stderr, level: Logger::WARN
60
- def logger
61
- LOGGER
62
- end
63
- end
64
-
65
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
66
- module GRPC
67
- extend MyLogger
77
+ client = ::Google::Cloud::ManagedKafka::V1::ManagedKafka::Client.new do |config|
78
+ config.logger = Logger.new "my-app.log"
68
79
  end
69
80
  ```
70
81
 
71
-
72
82
  ## Google Cloud Samples
73
83
 
74
84
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
@@ -212,14 +212,26 @@ module Google
212
212
  universe_domain: @config.universe_domain,
213
213
  channel_args: @config.channel_args,
214
214
  interceptors: @config.interceptors,
215
- channel_pool_config: @config.channel_pool
215
+ channel_pool_config: @config.channel_pool,
216
+ logger: @config.logger
216
217
  )
217
218
 
219
+ @managed_kafka_stub.stub_logger&.info do |entry|
220
+ entry.set_system_name
221
+ entry.set_service
222
+ entry.message = "Created client for #{entry.service}"
223
+ entry.set_credentials_fields credentials
224
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
225
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
226
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
227
+ end
228
+
218
229
  @location_client = Google::Cloud::Location::Locations::Client.new do |config|
219
230
  config.credentials = credentials
220
231
  config.quota_project = @quota_project_id
221
232
  config.endpoint = @managed_kafka_stub.endpoint
222
233
  config.universe_domain = @managed_kafka_stub.universe_domain
234
+ config.logger = @managed_kafka_stub.logger if config.respond_to? :logger=
223
235
  end
224
236
  end
225
237
 
@@ -237,6 +249,15 @@ module Google
237
249
  #
238
250
  attr_reader :location_client
239
251
 
252
+ ##
253
+ # The logger used for request/response debug logging.
254
+ #
255
+ # @return [Logger]
256
+ #
257
+ def logger
258
+ @managed_kafka_stub.logger
259
+ end
260
+
240
261
  # Service calls
241
262
 
242
263
  ##
@@ -339,7 +360,7 @@ module Google
339
360
  @managed_kafka_stub.call_rpc :list_clusters, request, options: options do |response, operation|
340
361
  response = ::Gapic::PagedEnumerable.new @managed_kafka_stub, :list_clusters, request, response, operation, options
341
362
  yield response, operation if block_given?
342
- return response
363
+ throw :response, response
343
364
  end
344
365
  rescue ::GRPC::BadStatus => e
345
366
  raise ::Google::Cloud::Error.from_error(e)
@@ -425,7 +446,6 @@ module Google
425
446
 
426
447
  @managed_kafka_stub.call_rpc :get_cluster, request, options: options do |response, operation|
427
448
  yield response, operation if block_given?
428
- return response
429
449
  end
430
450
  rescue ::GRPC::BadStatus => e
431
451
  raise ::Google::Cloud::Error.from_error(e)
@@ -545,7 +565,7 @@ module Google
545
565
  @managed_kafka_stub.call_rpc :create_cluster, request, options: options do |response, operation|
546
566
  response = ::Gapic::Operation.new response, @operations_client, options: options
547
567
  yield response, operation if block_given?
548
- return response
568
+ throw :response, response
549
569
  end
550
570
  rescue ::GRPC::BadStatus => e
551
571
  raise ::Google::Cloud::Error.from_error(e)
@@ -660,7 +680,7 @@ module Google
660
680
  @managed_kafka_stub.call_rpc :update_cluster, request, options: options do |response, operation|
661
681
  response = ::Gapic::Operation.new response, @operations_client, options: options
662
682
  yield response, operation if block_given?
663
- return response
683
+ throw :response, response
664
684
  end
665
685
  rescue ::GRPC::BadStatus => e
666
686
  raise ::Google::Cloud::Error.from_error(e)
@@ -769,7 +789,7 @@ module Google
769
789
  @managed_kafka_stub.call_rpc :delete_cluster, request, options: options do |response, operation|
770
790
  response = ::Gapic::Operation.new response, @operations_client, options: options
771
791
  yield response, operation if block_given?
772
- return response
792
+ throw :response, response
773
793
  end
774
794
  rescue ::GRPC::BadStatus => e
775
795
  raise ::Google::Cloud::Error.from_error(e)
@@ -871,7 +891,7 @@ module Google
871
891
  @managed_kafka_stub.call_rpc :list_topics, request, options: options do |response, operation|
872
892
  response = ::Gapic::PagedEnumerable.new @managed_kafka_stub, :list_topics, request, response, operation, options
873
893
  yield response, operation if block_given?
874
- return response
894
+ throw :response, response
875
895
  end
876
896
  rescue ::GRPC::BadStatus => e
877
897
  raise ::Google::Cloud::Error.from_error(e)
@@ -959,7 +979,6 @@ module Google
959
979
 
960
980
  @managed_kafka_stub.call_rpc :get_topic, request, options: options do |response, operation|
961
981
  yield response, operation if block_given?
962
- return response
963
982
  end
964
983
  rescue ::GRPC::BadStatus => e
965
984
  raise ::Google::Cloud::Error.from_error(e)
@@ -1055,7 +1074,6 @@ module Google
1055
1074
 
1056
1075
  @managed_kafka_stub.call_rpc :create_topic, request, options: options do |response, operation|
1057
1076
  yield response, operation if block_given?
1058
- return response
1059
1077
  end
1060
1078
  rescue ::GRPC::BadStatus => e
1061
1079
  raise ::Google::Cloud::Error.from_error(e)
@@ -1147,7 +1165,6 @@ module Google
1147
1165
 
1148
1166
  @managed_kafka_stub.call_rpc :update_topic, request, options: options do |response, operation|
1149
1167
  yield response, operation if block_given?
1150
- return response
1151
1168
  end
1152
1169
  rescue ::GRPC::BadStatus => e
1153
1170
  raise ::Google::Cloud::Error.from_error(e)
@@ -1234,7 +1251,6 @@ module Google
1234
1251
 
1235
1252
  @managed_kafka_stub.call_rpc :delete_topic, request, options: options do |response, operation|
1236
1253
  yield response, operation if block_given?
1237
- return response
1238
1254
  end
1239
1255
  rescue ::GRPC::BadStatus => e
1240
1256
  raise ::Google::Cloud::Error.from_error(e)
@@ -1337,7 +1353,7 @@ module Google
1337
1353
  @managed_kafka_stub.call_rpc :list_consumer_groups, request, options: options do |response, operation|
1338
1354
  response = ::Gapic::PagedEnumerable.new @managed_kafka_stub, :list_consumer_groups, request, response, operation, options
1339
1355
  yield response, operation if block_given?
1340
- return response
1356
+ throw :response, response
1341
1357
  end
1342
1358
  rescue ::GRPC::BadStatus => e
1343
1359
  raise ::Google::Cloud::Error.from_error(e)
@@ -1424,7 +1440,6 @@ module Google
1424
1440
 
1425
1441
  @managed_kafka_stub.call_rpc :get_consumer_group, request, options: options do |response, operation|
1426
1442
  yield response, operation if block_given?
1427
- return response
1428
1443
  end
1429
1444
  rescue ::GRPC::BadStatus => e
1430
1445
  raise ::Google::Cloud::Error.from_error(e)
@@ -1516,7 +1531,6 @@ module Google
1516
1531
 
1517
1532
  @managed_kafka_stub.call_rpc :update_consumer_group, request, options: options do |response, operation|
1518
1533
  yield response, operation if block_given?
1519
- return response
1520
1534
  end
1521
1535
  rescue ::GRPC::BadStatus => e
1522
1536
  raise ::Google::Cloud::Error.from_error(e)
@@ -1603,7 +1617,6 @@ module Google
1603
1617
 
1604
1618
  @managed_kafka_stub.call_rpc :delete_consumer_group, request, options: options do |response, operation|
1605
1619
  yield response, operation if block_given?
1606
- return response
1607
1620
  end
1608
1621
  rescue ::GRPC::BadStatus => e
1609
1622
  raise ::Google::Cloud::Error.from_error(e)
@@ -1692,6 +1705,11 @@ module Google
1692
1705
  # default endpoint URL. The default value of nil uses the environment
1693
1706
  # universe (usually the default "googleapis.com" universe).
1694
1707
  # @return [::String,nil]
1708
+ # @!attribute [rw] logger
1709
+ # A custom logger to use for request/response debug logging, or the value
1710
+ # `:default` (the default) to construct a default logger, or `nil` to
1711
+ # explicitly disable logging.
1712
+ # @return [::Logger,:default,nil]
1695
1713
  #
1696
1714
  class Configuration
1697
1715
  extend ::Gapic::Config
@@ -1716,6 +1734,7 @@ module Google
1716
1734
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
1717
1735
  config_attr :quota_project, nil, ::String, nil
1718
1736
  config_attr :universe_domain, nil, ::String, nil
1737
+ config_attr :logger, :default, ::Logger, nil, :default
1719
1738
 
1720
1739
  # @private
1721
1740
  def initialize parent_config = nil
@@ -213,7 +213,7 @@ module Google
213
213
  wrap_lro_operation = ->(op_response) { ::Gapic::Operation.new op_response, @operations_client }
214
214
  response = ::Gapic::PagedEnumerable.new @operations_stub, :list_operations, request, response, operation, options, format_resource: wrap_lro_operation
215
215
  yield response, operation if block_given?
216
- return response
216
+ throw :response, response
217
217
  end
218
218
  rescue ::GRPC::BadStatus => e
219
219
  raise ::Google::Cloud::Error.from_error(e)
@@ -309,7 +309,7 @@ module Google
309
309
  @operations_stub.call_rpc :get_operation, request, options: options do |response, operation|
310
310
  response = ::Gapic::Operation.new response, @operations_client, options: options
311
311
  yield response, operation if block_given?
312
- return response
312
+ throw :response, response
313
313
  end
314
314
  rescue ::GRPC::BadStatus => e
315
315
  raise ::Google::Cloud::Error.from_error(e)
@@ -398,7 +398,6 @@ module Google
398
398
 
399
399
  @operations_stub.call_rpc :delete_operation, request, options: options do |response, operation|
400
400
  yield response, operation if block_given?
401
- return response
402
401
  end
403
402
  rescue ::GRPC::BadStatus => e
404
403
  raise ::Google::Cloud::Error.from_error(e)
@@ -494,7 +493,6 @@ module Google
494
493
 
495
494
  @operations_stub.call_rpc :cancel_operation, request, options: options do |response, operation|
496
495
  yield response, operation if block_given?
497
- return response
498
496
  end
499
497
  rescue ::GRPC::BadStatus => e
500
498
  raise ::Google::Cloud::Error.from_error(e)
@@ -592,7 +590,7 @@ module Google
592
590
  @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation|
593
591
  response = ::Gapic::Operation.new response, @operations_client, options: options
594
592
  yield response, operation if block_given?
595
- return response
593
+ throw :response, response
596
594
  end
597
595
  rescue ::GRPC::BadStatus => e
598
596
  raise ::Google::Cloud::Error.from_error(e)
@@ -681,6 +679,11 @@ module Google
681
679
  # default endpoint URL. The default value of nil uses the environment
682
680
  # universe (usually the default "googleapis.com" universe).
683
681
  # @return [::String,nil]
682
+ # @!attribute [rw] logger
683
+ # A custom logger to use for request/response debug logging, or the value
684
+ # `:default` (the default) to construct a default logger, or `nil` to
685
+ # explicitly disable logging.
686
+ # @return [::Logger,:default,nil]
684
687
  #
685
688
  class Configuration
686
689
  extend ::Gapic::Config
@@ -705,6 +708,7 @@ module Google
705
708
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
706
709
  config_attr :quota_project, nil, ::String, nil
707
710
  config_attr :universe_domain, nil, ::String, nil
711
+ config_attr :logger, :default, ::Logger, nil, :default
708
712
 
709
713
  # @private
710
714
  def initialize parent_config = nil
@@ -205,15 +205,27 @@ module Google
205
205
  endpoint: @config.endpoint,
206
206
  endpoint_template: DEFAULT_ENDPOINT_TEMPLATE,
207
207
  universe_domain: @config.universe_domain,
208
- credentials: credentials
208
+ credentials: credentials,
209
+ logger: @config.logger
209
210
  )
210
211
 
212
+ @managed_kafka_stub.logger(stub: true)&.info do |entry|
213
+ entry.set_system_name
214
+ entry.set_service
215
+ entry.message = "Created client for #{entry.service}"
216
+ entry.set_credentials_fields credentials
217
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
218
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
219
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
220
+ end
221
+
211
222
  @location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
212
223
  config.credentials = credentials
213
224
  config.quota_project = @quota_project_id
214
225
  config.endpoint = @managed_kafka_stub.endpoint
215
226
  config.universe_domain = @managed_kafka_stub.universe_domain
216
227
  config.bindings_override = @config.bindings_override
228
+ config.logger = @managed_kafka_stub.logger if config.respond_to? :logger=
217
229
  end
218
230
  end
219
231
 
@@ -231,6 +243,15 @@ module Google
231
243
  #
232
244
  attr_reader :location_client
233
245
 
246
+ ##
247
+ # The logger used for request/response debug logging.
248
+ #
249
+ # @return [Logger]
250
+ #
251
+ def logger
252
+ @managed_kafka_stub.logger
253
+ end
254
+
234
255
  # Service calls
235
256
 
236
257
  ##
@@ -325,7 +346,6 @@ module Google
325
346
 
326
347
  @managed_kafka_stub.list_clusters request, options do |result, operation|
327
348
  yield result, operation if block_given?
328
- return result
329
349
  end
330
350
  rescue ::Gapic::Rest::Error => e
331
351
  raise ::Google::Cloud::Error.from_error(e)
@@ -404,7 +424,6 @@ module Google
404
424
 
405
425
  @managed_kafka_stub.get_cluster request, options do |result, operation|
406
426
  yield result, operation if block_given?
407
- return result
408
427
  end
409
428
  rescue ::Gapic::Rest::Error => e
410
429
  raise ::Google::Cloud::Error.from_error(e)
@@ -517,7 +536,7 @@ module Google
517
536
  @managed_kafka_stub.create_cluster request, options do |result, operation|
518
537
  result = ::Gapic::Operation.new result, @operations_client, options: options
519
538
  yield result, operation if block_given?
520
- return result
539
+ throw :response, result
521
540
  end
522
541
  rescue ::Gapic::Rest::Error => e
523
542
  raise ::Google::Cloud::Error.from_error(e)
@@ -625,7 +644,7 @@ module Google
625
644
  @managed_kafka_stub.update_cluster request, options do |result, operation|
626
645
  result = ::Gapic::Operation.new result, @operations_client, options: options
627
646
  yield result, operation if block_given?
628
- return result
647
+ throw :response, result
629
648
  end
630
649
  rescue ::Gapic::Rest::Error => e
631
650
  raise ::Google::Cloud::Error.from_error(e)
@@ -727,7 +746,7 @@ module Google
727
746
  @managed_kafka_stub.delete_cluster request, options do |result, operation|
728
747
  result = ::Gapic::Operation.new result, @operations_client, options: options
729
748
  yield result, operation if block_given?
730
- return result
749
+ throw :response, result
731
750
  end
732
751
  rescue ::Gapic::Rest::Error => e
733
752
  raise ::Google::Cloud::Error.from_error(e)
@@ -822,7 +841,7 @@ module Google
822
841
  @managed_kafka_stub.list_topics request, options do |result, operation|
823
842
  result = ::Gapic::Rest::PagedEnumerable.new @managed_kafka_stub, :list_topics, "topics", request, result, options
824
843
  yield result, operation if block_given?
825
- return result
844
+ throw :response, result
826
845
  end
827
846
  rescue ::Gapic::Rest::Error => e
828
847
  raise ::Google::Cloud::Error.from_error(e)
@@ -903,7 +922,6 @@ module Google
903
922
 
904
923
  @managed_kafka_stub.get_topic request, options do |result, operation|
905
924
  yield result, operation if block_given?
906
- return result
907
925
  end
908
926
  rescue ::Gapic::Rest::Error => e
909
927
  raise ::Google::Cloud::Error.from_error(e)
@@ -992,7 +1010,6 @@ module Google
992
1010
 
993
1011
  @managed_kafka_stub.create_topic request, options do |result, operation|
994
1012
  yield result, operation if block_given?
995
- return result
996
1013
  end
997
1014
  rescue ::Gapic::Rest::Error => e
998
1015
  raise ::Google::Cloud::Error.from_error(e)
@@ -1077,7 +1094,6 @@ module Google
1077
1094
 
1078
1095
  @managed_kafka_stub.update_topic request, options do |result, operation|
1079
1096
  yield result, operation if block_given?
1080
- return result
1081
1097
  end
1082
1098
  rescue ::Gapic::Rest::Error => e
1083
1099
  raise ::Google::Cloud::Error.from_error(e)
@@ -1157,7 +1173,6 @@ module Google
1157
1173
 
1158
1174
  @managed_kafka_stub.delete_topic request, options do |result, operation|
1159
1175
  yield result, operation if block_given?
1160
- return result
1161
1176
  end
1162
1177
  rescue ::Gapic::Rest::Error => e
1163
1178
  raise ::Google::Cloud::Error.from_error(e)
@@ -1253,7 +1268,7 @@ module Google
1253
1268
  @managed_kafka_stub.list_consumer_groups request, options do |result, operation|
1254
1269
  result = ::Gapic::Rest::PagedEnumerable.new @managed_kafka_stub, :list_consumer_groups, "consumer_groups", request, result, options
1255
1270
  yield result, operation if block_given?
1256
- return result
1271
+ throw :response, result
1257
1272
  end
1258
1273
  rescue ::Gapic::Rest::Error => e
1259
1274
  raise ::Google::Cloud::Error.from_error(e)
@@ -1333,7 +1348,6 @@ module Google
1333
1348
 
1334
1349
  @managed_kafka_stub.get_consumer_group request, options do |result, operation|
1335
1350
  yield result, operation if block_given?
1336
- return result
1337
1351
  end
1338
1352
  rescue ::Gapic::Rest::Error => e
1339
1353
  raise ::Google::Cloud::Error.from_error(e)
@@ -1418,7 +1432,6 @@ module Google
1418
1432
 
1419
1433
  @managed_kafka_stub.update_consumer_group request, options do |result, operation|
1420
1434
  yield result, operation if block_given?
1421
- return result
1422
1435
  end
1423
1436
  rescue ::Gapic::Rest::Error => e
1424
1437
  raise ::Google::Cloud::Error.from_error(e)
@@ -1498,7 +1511,6 @@ module Google
1498
1511
 
1499
1512
  @managed_kafka_stub.delete_consumer_group request, options do |result, operation|
1500
1513
  yield result, operation if block_given?
1501
- return result
1502
1514
  end
1503
1515
  rescue ::Gapic::Rest::Error => e
1504
1516
  raise ::Google::Cloud::Error.from_error(e)
@@ -1578,6 +1590,11 @@ module Google
1578
1590
  # default endpoint URL. The default value of nil uses the environment
1579
1591
  # universe (usually the default "googleapis.com" universe).
1580
1592
  # @return [::String,nil]
1593
+ # @!attribute [rw] logger
1594
+ # A custom logger to use for request/response debug logging, or the value
1595
+ # `:default` (the default) to construct a default logger, or `nil` to
1596
+ # explicitly disable logging.
1597
+ # @return [::Logger,:default,nil]
1581
1598
  #
1582
1599
  class Configuration
1583
1600
  extend ::Gapic::Config
@@ -1606,6 +1623,7 @@ module Google
1606
1623
  # by the host service.
1607
1624
  # @return [::Hash{::Symbol=>::Array<::Gapic::Rest::GrpcTranscoder::HttpBinding>}]
1608
1625
  config_attr :bindings_override, {}, ::Hash, nil
1626
+ config_attr :logger, :default, ::Logger, nil, :default
1609
1627
 
1610
1628
  # @private
1611
1629
  def initialize parent_config = nil
@@ -196,7 +196,7 @@ module Google
196
196
  @operations_stub.list_operations request, options do |result, operation|
197
197
  result = ::Gapic::Rest::PagedEnumerable.new @operations_stub, :list_operations, "operations", request, result, options
198
198
  yield result, operation if block_given?
199
- return result
199
+ throw :response, result
200
200
  end
201
201
  rescue ::Gapic::Rest::Error => e
202
202
  raise ::Google::Cloud::Error.from_error(e)
@@ -285,7 +285,7 @@ module Google
285
285
  @operations_stub.get_operation request, options do |result, operation|
286
286
  result = ::Gapic::Operation.new result, @operations_client, options: options
287
287
  yield result, operation if block_given?
288
- return result
288
+ throw :response, result
289
289
  end
290
290
  rescue ::Gapic::Rest::Error => e
291
291
  raise ::Google::Cloud::Error.from_error(e)
@@ -367,7 +367,6 @@ module Google
367
367
 
368
368
  @operations_stub.delete_operation request, options do |result, operation|
369
369
  yield result, operation if block_given?
370
- return result
371
370
  end
372
371
  rescue ::Gapic::Rest::Error => e
373
372
  raise ::Google::Cloud::Error.from_error(e)
@@ -456,7 +455,6 @@ module Google
456
455
 
457
456
  @operations_stub.cancel_operation request, options do |result, operation|
458
457
  yield result, operation if block_given?
459
- return result
460
458
  end
461
459
  rescue ::Gapic::Rest::Error => e
462
460
  raise ::Google::Cloud::Error.from_error(e)
@@ -536,6 +534,11 @@ module Google
536
534
  # default endpoint URL. The default value of nil uses the environment
537
535
  # universe (usually the default "googleapis.com" universe).
538
536
  # @return [::String,nil]
537
+ # @!attribute [rw] logger
538
+ # A custom logger to use for request/response debug logging, or the value
539
+ # `:default` (the default) to construct a default logger, or `nil` to
540
+ # explicitly disable logging.
541
+ # @return [::Logger,:default,nil]
539
542
  #
540
543
  class Configuration
541
544
  extend ::Gapic::Config
@@ -557,6 +560,7 @@ module Google
557
560
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
558
561
  config_attr :quota_project, nil, ::String, nil
559
562
  config_attr :universe_domain, nil, ::String, nil
563
+ config_attr :logger, :default, ::Logger, nil, :default
560
564
 
561
565
  # @private
562
566
  def initialize parent_config = nil
@@ -676,16 +680,18 @@ module Google
676
680
 
677
681
  response = @client_stub.make_http_request(
678
682
  verb,
679
- uri: uri,
680
- body: body || "",
681
- params: query_string_params,
683
+ uri: uri,
684
+ body: body || "",
685
+ params: query_string_params,
686
+ method_name: "list_operations",
682
687
  options: options
683
688
  )
684
689
  operation = ::Gapic::Rest::TransportOperation.new response
685
690
  result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true
686
-
687
- yield result, operation if block_given?
688
- result
691
+ catch :response do
692
+ yield result, operation if block_given?
693
+ result
694
+ end
689
695
  end
690
696
 
691
697
  ##
@@ -714,16 +720,18 @@ module Google
714
720
 
715
721
  response = @client_stub.make_http_request(
716
722
  verb,
717
- uri: uri,
718
- body: body || "",
719
- params: query_string_params,
723
+ uri: uri,
724
+ body: body || "",
725
+ params: query_string_params,
726
+ method_name: "get_operation",
720
727
  options: options
721
728
  )
722
729
  operation = ::Gapic::Rest::TransportOperation.new response
723
730
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
724
-
725
- yield result, operation if block_given?
726
- result
731
+ catch :response do
732
+ yield result, operation if block_given?
733
+ result
734
+ end
727
735
  end
728
736
 
729
737
  ##
@@ -752,16 +760,18 @@ module Google
752
760
 
753
761
  response = @client_stub.make_http_request(
754
762
  verb,
755
- uri: uri,
756
- body: body || "",
757
- params: query_string_params,
763
+ uri: uri,
764
+ body: body || "",
765
+ params: query_string_params,
766
+ method_name: "delete_operation",
758
767
  options: options
759
768
  )
760
769
  operation = ::Gapic::Rest::TransportOperation.new response
761
770
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
762
-
763
- yield result, operation if block_given?
764
- result
771
+ catch :response do
772
+ yield result, operation if block_given?
773
+ result
774
+ end
765
775
  end
766
776
 
767
777
  ##
@@ -790,16 +800,18 @@ module Google
790
800
 
791
801
  response = @client_stub.make_http_request(
792
802
  verb,
793
- uri: uri,
794
- body: body || "",
795
- params: query_string_params,
803
+ uri: uri,
804
+ body: body || "",
805
+ params: query_string_params,
806
+ method_name: "cancel_operation",
796
807
  options: options
797
808
  )
798
809
  operation = ::Gapic::Rest::TransportOperation.new response
799
810
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
800
-
801
- yield result, operation if block_given?
802
- result
811
+ catch :response do
812
+ yield result, operation if block_given?
813
+ result
814
+ end
803
815
  end
804
816
 
805
817
  ##
@@ -30,7 +30,8 @@ module Google
30
30
  # including transcoding, making the REST call, and deserialing the response.
31
31
  #
32
32
  class ServiceStub
33
- def initialize endpoint:, endpoint_template:, universe_domain:, credentials:
33
+ # @private
34
+ def initialize endpoint:, endpoint_template:, universe_domain:, credentials:, logger:
34
35
  # These require statements are intentionally placed here to initialize
35
36
  # the REST modules only when it's required.
36
37
  require "gapic/rest"
@@ -40,7 +41,9 @@ module Google
40
41
  universe_domain: universe_domain,
41
42
  credentials: credentials,
42
43
  numeric_enums: true,
43
- raise_faraday_errors: false
44
+ service_name: self.class,
45
+ raise_faraday_errors: false,
46
+ logger: logger
44
47
  end
45
48
 
46
49
  ##
@@ -61,6 +64,15 @@ module Google
61
64
  @client_stub.endpoint
62
65
  end
63
66
 
67
+ ##
68
+ # The logger used for request/response debug logging.
69
+ #
70
+ # @return [Logger]
71
+ #
72
+ def logger stub: false
73
+ stub ? @client_stub.stub_logger : @client_stub.logger
74
+ end
75
+
64
76
  ##
65
77
  # Baseline implementation for the list_clusters REST call
66
78
  #
@@ -87,16 +99,18 @@ module Google
87
99
 
88
100
  response = @client_stub.make_http_request(
89
101
  verb,
90
- uri: uri,
91
- body: body || "",
92
- params: query_string_params,
102
+ uri: uri,
103
+ body: body || "",
104
+ params: query_string_params,
105
+ method_name: "list_clusters",
93
106
  options: options
94
107
  )
95
108
  operation = ::Gapic::Rest::TransportOperation.new response
96
109
  result = ::Google::Cloud::ManagedKafka::V1::ListClustersResponse.decode_json response.body, ignore_unknown_fields: true
97
-
98
- yield result, operation if block_given?
99
- result
110
+ catch :response do
111
+ yield result, operation if block_given?
112
+ result
113
+ end
100
114
  end
101
115
 
102
116
  ##
@@ -125,16 +139,18 @@ module Google
125
139
 
126
140
  response = @client_stub.make_http_request(
127
141
  verb,
128
- uri: uri,
129
- body: body || "",
130
- params: query_string_params,
142
+ uri: uri,
143
+ body: body || "",
144
+ params: query_string_params,
145
+ method_name: "get_cluster",
131
146
  options: options
132
147
  )
133
148
  operation = ::Gapic::Rest::TransportOperation.new response
134
149
  result = ::Google::Cloud::ManagedKafka::V1::Cluster.decode_json response.body, ignore_unknown_fields: true
135
-
136
- yield result, operation if block_given?
137
- result
150
+ catch :response do
151
+ yield result, operation if block_given?
152
+ result
153
+ end
138
154
  end
139
155
 
140
156
  ##
@@ -163,16 +179,18 @@ module Google
163
179
 
164
180
  response = @client_stub.make_http_request(
165
181
  verb,
166
- uri: uri,
167
- body: body || "",
168
- params: query_string_params,
182
+ uri: uri,
183
+ body: body || "",
184
+ params: query_string_params,
185
+ method_name: "create_cluster",
169
186
  options: options
170
187
  )
171
188
  operation = ::Gapic::Rest::TransportOperation.new response
172
189
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
173
-
174
- yield result, operation if block_given?
175
- result
190
+ catch :response do
191
+ yield result, operation if block_given?
192
+ result
193
+ end
176
194
  end
177
195
 
178
196
  ##
@@ -201,16 +219,18 @@ module Google
201
219
 
202
220
  response = @client_stub.make_http_request(
203
221
  verb,
204
- uri: uri,
205
- body: body || "",
206
- params: query_string_params,
222
+ uri: uri,
223
+ body: body || "",
224
+ params: query_string_params,
225
+ method_name: "update_cluster",
207
226
  options: options
208
227
  )
209
228
  operation = ::Gapic::Rest::TransportOperation.new response
210
229
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
211
-
212
- yield result, operation if block_given?
213
- result
230
+ catch :response do
231
+ yield result, operation if block_given?
232
+ result
233
+ end
214
234
  end
215
235
 
216
236
  ##
@@ -239,16 +259,18 @@ module Google
239
259
 
240
260
  response = @client_stub.make_http_request(
241
261
  verb,
242
- uri: uri,
243
- body: body || "",
244
- params: query_string_params,
262
+ uri: uri,
263
+ body: body || "",
264
+ params: query_string_params,
265
+ method_name: "delete_cluster",
245
266
  options: options
246
267
  )
247
268
  operation = ::Gapic::Rest::TransportOperation.new response
248
269
  result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
249
-
250
- yield result, operation if block_given?
251
- result
270
+ catch :response do
271
+ yield result, operation if block_given?
272
+ result
273
+ end
252
274
  end
253
275
 
254
276
  ##
@@ -277,16 +299,18 @@ module Google
277
299
 
278
300
  response = @client_stub.make_http_request(
279
301
  verb,
280
- uri: uri,
281
- body: body || "",
282
- params: query_string_params,
302
+ uri: uri,
303
+ body: body || "",
304
+ params: query_string_params,
305
+ method_name: "list_topics",
283
306
  options: options
284
307
  )
285
308
  operation = ::Gapic::Rest::TransportOperation.new response
286
309
  result = ::Google::Cloud::ManagedKafka::V1::ListTopicsResponse.decode_json response.body, ignore_unknown_fields: true
287
-
288
- yield result, operation if block_given?
289
- result
310
+ catch :response do
311
+ yield result, operation if block_given?
312
+ result
313
+ end
290
314
  end
291
315
 
292
316
  ##
@@ -315,16 +339,18 @@ module Google
315
339
 
316
340
  response = @client_stub.make_http_request(
317
341
  verb,
318
- uri: uri,
319
- body: body || "",
320
- params: query_string_params,
342
+ uri: uri,
343
+ body: body || "",
344
+ params: query_string_params,
345
+ method_name: "get_topic",
321
346
  options: options
322
347
  )
323
348
  operation = ::Gapic::Rest::TransportOperation.new response
324
349
  result = ::Google::Cloud::ManagedKafka::V1::Topic.decode_json response.body, ignore_unknown_fields: true
325
-
326
- yield result, operation if block_given?
327
- result
350
+ catch :response do
351
+ yield result, operation if block_given?
352
+ result
353
+ end
328
354
  end
329
355
 
330
356
  ##
@@ -353,16 +379,18 @@ module Google
353
379
 
354
380
  response = @client_stub.make_http_request(
355
381
  verb,
356
- uri: uri,
357
- body: body || "",
358
- params: query_string_params,
382
+ uri: uri,
383
+ body: body || "",
384
+ params: query_string_params,
385
+ method_name: "create_topic",
359
386
  options: options
360
387
  )
361
388
  operation = ::Gapic::Rest::TransportOperation.new response
362
389
  result = ::Google::Cloud::ManagedKafka::V1::Topic.decode_json response.body, ignore_unknown_fields: true
363
-
364
- yield result, operation if block_given?
365
- result
390
+ catch :response do
391
+ yield result, operation if block_given?
392
+ result
393
+ end
366
394
  end
367
395
 
368
396
  ##
@@ -391,16 +419,18 @@ module Google
391
419
 
392
420
  response = @client_stub.make_http_request(
393
421
  verb,
394
- uri: uri,
395
- body: body || "",
396
- params: query_string_params,
422
+ uri: uri,
423
+ body: body || "",
424
+ params: query_string_params,
425
+ method_name: "update_topic",
397
426
  options: options
398
427
  )
399
428
  operation = ::Gapic::Rest::TransportOperation.new response
400
429
  result = ::Google::Cloud::ManagedKafka::V1::Topic.decode_json response.body, ignore_unknown_fields: true
401
-
402
- yield result, operation if block_given?
403
- result
430
+ catch :response do
431
+ yield result, operation if block_given?
432
+ result
433
+ end
404
434
  end
405
435
 
406
436
  ##
@@ -429,16 +459,18 @@ module Google
429
459
 
430
460
  response = @client_stub.make_http_request(
431
461
  verb,
432
- uri: uri,
433
- body: body || "",
434
- params: query_string_params,
462
+ uri: uri,
463
+ body: body || "",
464
+ params: query_string_params,
465
+ method_name: "delete_topic",
435
466
  options: options
436
467
  )
437
468
  operation = ::Gapic::Rest::TransportOperation.new response
438
469
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
439
-
440
- yield result, operation if block_given?
441
- result
470
+ catch :response do
471
+ yield result, operation if block_given?
472
+ result
473
+ end
442
474
  end
443
475
 
444
476
  ##
@@ -467,16 +499,18 @@ module Google
467
499
 
468
500
  response = @client_stub.make_http_request(
469
501
  verb,
470
- uri: uri,
471
- body: body || "",
472
- params: query_string_params,
502
+ uri: uri,
503
+ body: body || "",
504
+ params: query_string_params,
505
+ method_name: "list_consumer_groups",
473
506
  options: options
474
507
  )
475
508
  operation = ::Gapic::Rest::TransportOperation.new response
476
509
  result = ::Google::Cloud::ManagedKafka::V1::ListConsumerGroupsResponse.decode_json response.body, ignore_unknown_fields: true
477
-
478
- yield result, operation if block_given?
479
- result
510
+ catch :response do
511
+ yield result, operation if block_given?
512
+ result
513
+ end
480
514
  end
481
515
 
482
516
  ##
@@ -505,16 +539,18 @@ module Google
505
539
 
506
540
  response = @client_stub.make_http_request(
507
541
  verb,
508
- uri: uri,
509
- body: body || "",
510
- params: query_string_params,
542
+ uri: uri,
543
+ body: body || "",
544
+ params: query_string_params,
545
+ method_name: "get_consumer_group",
511
546
  options: options
512
547
  )
513
548
  operation = ::Gapic::Rest::TransportOperation.new response
514
549
  result = ::Google::Cloud::ManagedKafka::V1::ConsumerGroup.decode_json response.body, ignore_unknown_fields: true
515
-
516
- yield result, operation if block_given?
517
- result
550
+ catch :response do
551
+ yield result, operation if block_given?
552
+ result
553
+ end
518
554
  end
519
555
 
520
556
  ##
@@ -543,16 +579,18 @@ module Google
543
579
 
544
580
  response = @client_stub.make_http_request(
545
581
  verb,
546
- uri: uri,
547
- body: body || "",
548
- params: query_string_params,
582
+ uri: uri,
583
+ body: body || "",
584
+ params: query_string_params,
585
+ method_name: "update_consumer_group",
549
586
  options: options
550
587
  )
551
588
  operation = ::Gapic::Rest::TransportOperation.new response
552
589
  result = ::Google::Cloud::ManagedKafka::V1::ConsumerGroup.decode_json response.body, ignore_unknown_fields: true
553
-
554
- yield result, operation if block_given?
555
- result
590
+ catch :response do
591
+ yield result, operation if block_given?
592
+ result
593
+ end
556
594
  end
557
595
 
558
596
  ##
@@ -581,16 +619,18 @@ module Google
581
619
 
582
620
  response = @client_stub.make_http_request(
583
621
  verb,
584
- uri: uri,
585
- body: body || "",
586
- params: query_string_params,
622
+ uri: uri,
623
+ body: body || "",
624
+ params: query_string_params,
625
+ method_name: "delete_consumer_group",
587
626
  options: options
588
627
  )
589
628
  operation = ::Gapic::Rest::TransportOperation.new response
590
629
  result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true
591
-
592
- yield result, operation if block_given?
593
- result
630
+ catch :response do
631
+ yield result, operation if block_given?
632
+ result
633
+ end
594
634
  end
595
635
 
596
636
  ##
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module ManagedKafka
23
23
  module V1
24
- VERSION = "0.2.0"
24
+ VERSION = "0.4.0"
25
25
  end
26
26
  end
27
27
  end
@@ -9,7 +9,7 @@ require 'google/api/resource_pb'
9
9
  require 'google/protobuf/timestamp_pb'
10
10
 
11
11
 
12
- descriptor_data = "\n,google/cloud/managedkafka/v1/resources.proto\x12\x1cgoogle.cloud.managedkafka.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd8\x06\n\x07\x43luster\x12\x42\n\ngcp_config\x18\t \x01(\x0b\x32\'.google.cloud.managedkafka.v1.GcpConfigB\x03\xe0\x41\x02H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.managedkafka.v1.Cluster.LabelsEntryB\x03\xe0\x41\x01\x12J\n\x0f\x63\x61pacity_config\x18\x05 \x01(\x0b\x32,.google.cloud.managedkafka.v1.CapacityConfigB\x03\xe0\x41\x02\x12L\n\x10rebalance_config\x18\x08 \x01(\x0b\x32-.google.cloud.managedkafka.v1.RebalanceConfigB\x03\xe0\x41\x01\x12?\n\x05state\x18\n \x01(\x0e\x32+.google.cloud.managedkafka.v1.Cluster.StateB\x03\xe0\x41\x03\x12\x1f\n\rsatisfies_pzi\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1f\n\rsatisfies_pzs\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03:w\xea\x41t\n#managedkafka.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}*\x08\x63lusters2\x07\x63lusterB\x11\n\x0fplatform_configB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzs\"D\n\x0e\x43\x61pacityConfig\x12\x17\n\nvcpu_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x19\n\x0cmemory_bytes\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\"\xa8\x01\n\x0fRebalanceConfig\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x32.google.cloud.managedkafka.v1.RebalanceConfig.ModeB\x03\xe0\x41\x01\"N\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNO_REBALANCE\x10\x01\x12\x1e\n\x1a\x41UTO_REBALANCE_ON_SCALE_UP\x10\x02\"$\n\rNetworkConfig\x12\x13\n\x06subnet\x18\x02 \x01(\tB\x03\xe0\x41\x02\"Y\n\x0c\x41\x63\x63\x65ssConfig\x12I\n\x0fnetwork_configs\x18\x01 \x03(\x0b\x32+.google.cloud.managedkafka.v1.NetworkConfigB\x03\xe0\x41\x02\"\x92\x01\n\tGcpConfig\x12\x46\n\raccess_config\x18\x03 \x01(\x0b\x32*.google.cloud.managedkafka.v1.AccessConfigB\x03\xe0\x41\x02\x12=\n\x07kms_key\x18\x02 \x01(\tB,\xe0\x41\x01\xe0\x41\x05\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"\xd7\x02\n\x05Topic\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0fpartition_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\"\n\x12replication_factor\x18\x03 \x01(\x05\x42\x06\xe0\x41\x02\xe0\x41\x05\x12\x46\n\x07\x63onfigs\x18\x04 \x03(\x0b\x32\x30.google.cloud.managedkafka.v1.Topic.ConfigsEntryB\x03\xe0\x41\x01\x1a.\n\x0c\x43onfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x80\x01\xea\x41}\n!managedkafka.googleapis.com/Topic\x12Iprojects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}*\x06topics2\x05topic\"\xe1\x01\n\x15\x43onsumerTopicMetadata\x12\\\n\npartitions\x18\x01 \x03(\x0b\x32\x43.google.cloud.managedkafka.v1.ConsumerTopicMetadata.PartitionsEntryB\x03\xe0\x41\x01\x1aj\n\x0fPartitionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.managedkafka.v1.ConsumerPartitionMetadata:\x02\x38\x01\"G\n\x19\x43onsumerPartitionMetadata\x12\x13\n\x06offset\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x15\n\x08metadata\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x81\x03\n\rConsumerGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12L\n\x06topics\x18\x02 \x03(\x0b\x32\x37.google.cloud.managedkafka.v1.ConsumerGroup.TopicsEntryB\x03\xe0\x41\x01\x1a\x62\n\x0bTopicsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.managedkafka.v1.ConsumerTopicMetadata:\x02\x38\x01:\xaa\x01\xea\x41\xa6\x01\n)managedkafka.googleapis.com/ConsumerGroup\x12Zprojects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}*\x0e\x63onsumerGroups2\rconsumerGroup\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x42\xd5\x02\n com.google.cloud.managedkafka.v1B\x0eResourcesProtoP\x01ZDcloud.google.com/go/managedkafka/apiv1/managedkafkapb;managedkafkapb\xaa\x02\x1cGoogle.Cloud.ManagedKafka.V1\xca\x02\x1cGoogle\\Cloud\\ManagedKafka\\V1\xea\x02\x1fGoogle::Cloud::ManagedKafka::V1\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}b\x06proto3"
12
+ descriptor_data = "\n,google/cloud/managedkafka/v1/resources.proto\x12\x1cgoogle.cloud.managedkafka.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd8\x06\n\x07\x43luster\x12\x42\n\ngcp_config\x18\t \x01(\x0b\x32\'.google.cloud.managedkafka.v1.GcpConfigB\x03\xe0\x41\x02H\x00\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x46\n\x06labels\x18\x04 \x03(\x0b\x32\x31.google.cloud.managedkafka.v1.Cluster.LabelsEntryB\x03\xe0\x41\x01\x12J\n\x0f\x63\x61pacity_config\x18\x05 \x01(\x0b\x32,.google.cloud.managedkafka.v1.CapacityConfigB\x03\xe0\x41\x02\x12L\n\x10rebalance_config\x18\x08 \x01(\x0b\x32-.google.cloud.managedkafka.v1.RebalanceConfigB\x03\xe0\x41\x01\x12?\n\x05state\x18\n \x01(\x0e\x32+.google.cloud.managedkafka.v1.Cluster.StateB\x03\xe0\x41\x03\x12\x1f\n\rsatisfies_pzi\x18\x0b \x01(\x08\x42\x03\xe0\x41\x03H\x01\x88\x01\x01\x12\x1f\n\rsatisfies_pzs\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03H\x02\x88\x01\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"F\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03:w\xea\x41t\n#managedkafka.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}*\x08\x63lusters2\x07\x63lusterB\x11\n\x0fplatform_configB\x10\n\x0e_satisfies_pziB\x10\n\x0e_satisfies_pzs\"D\n\x0e\x43\x61pacityConfig\x12\x17\n\nvcpu_count\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x19\n\x0cmemory_bytes\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\"\xa8\x01\n\x0fRebalanceConfig\x12\x45\n\x04mode\x18\x01 \x01(\x0e\x32\x32.google.cloud.managedkafka.v1.RebalanceConfig.ModeB\x03\xe0\x41\x01\"N\n\x04Mode\x12\x14\n\x10MODE_UNSPECIFIED\x10\x00\x12\x10\n\x0cNO_REBALANCE\x10\x01\x12\x1e\n\x1a\x41UTO_REBALANCE_ON_SCALE_UP\x10\x02\"$\n\rNetworkConfig\x12\x13\n\x06subnet\x18\x02 \x01(\tB\x03\xe0\x41\x02\"Y\n\x0c\x41\x63\x63\x65ssConfig\x12I\n\x0fnetwork_configs\x18\x01 \x03(\x0b\x32+.google.cloud.managedkafka.v1.NetworkConfigB\x03\xe0\x41\x02\"\x92\x01\n\tGcpConfig\x12\x46\n\raccess_config\x18\x03 \x01(\x0b\x32*.google.cloud.managedkafka.v1.AccessConfigB\x03\xe0\x41\x02\x12=\n\x07kms_key\x18\x02 \x01(\tB,\xe0\x41\x01\xe0\x41\x05\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"\xd7\x02\n\x05Topic\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x1c\n\x0fpartition_count\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12\"\n\x12replication_factor\x18\x03 \x01(\x05\x42\x06\xe0\x41\x02\xe0\x41\x05\x12\x46\n\x07\x63onfigs\x18\x04 \x03(\x0b\x32\x30.google.cloud.managedkafka.v1.Topic.ConfigsEntryB\x03\xe0\x41\x01\x1a.\n\x0c\x43onfigsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x80\x01\xea\x41}\n!managedkafka.googleapis.com/Topic\x12Iprojects/{project}/locations/{location}/clusters/{cluster}/topics/{topic}*\x06topics2\x05topic\"\xe1\x01\n\x15\x43onsumerTopicMetadata\x12\\\n\npartitions\x18\x01 \x03(\x0b\x32\x43.google.cloud.managedkafka.v1.ConsumerTopicMetadata.PartitionsEntryB\x03\xe0\x41\x01\x1aj\n\x0fPartitionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x46\n\x05value\x18\x02 \x01(\x0b\x32\x37.google.cloud.managedkafka.v1.ConsumerPartitionMetadata:\x02\x38\x01\"G\n\x19\x43onsumerPartitionMetadata\x12\x13\n\x06offset\x18\x01 \x01(\x03\x42\x03\xe0\x41\x02\x12\x15\n\x08metadata\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x81\x03\n\rConsumerGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12L\n\x06topics\x18\x02 \x03(\x0b\x32\x37.google.cloud.managedkafka.v1.ConsumerGroup.TopicsEntryB\x03\xe0\x41\x01\x1a\x62\n\x0bTopicsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x42\n\x05value\x18\x02 \x01(\x0b\x32\x33.google.cloud.managedkafka.v1.ConsumerTopicMetadata:\x02\x38\x01:\xaa\x01\xea\x41\xa6\x01\n)managedkafka.googleapis.com/ConsumerGroup\x12Zprojects/{project}/locations/{location}/clusters/{cluster}/consumerGroups/{consumer_group}*\x0e\x63onsumerGroups2\rconsumerGroup\"\x80\x02\n\x11OperationMetadata\x12\x34\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x06target\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04verb\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16requested_cancellation\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x18\n\x0b\x61pi_version\x18\x07 \x01(\tB\x03\xe0\x41\x03\x42\xc3\x03\n com.google.cloud.managedkafka.v1B\x0eResourcesProtoP\x01ZDcloud.google.com/go/managedkafka/apiv1/managedkafkapb;managedkafkapb\xaa\x02\x1cGoogle.Cloud.ManagedKafka.V1\xca\x02\x1cGoogle\\Cloud\\ManagedKafka\\V1\xea\x02\x1fGoogle::Cloud::ManagedKafka::V1\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}\xea\x41k\n*secretmanager.googleapis.com/SecretVersion\x12=projects/{project}/secrets/{secret}/versions/{secret_version}b\x06proto3"
13
13
 
14
14
  pool = Google::Protobuf::DescriptorPool.generated_pool
15
15
 
@@ -306,9 +306,28 @@ module Google
306
306
  # @!attribute [rw] common
307
307
  # @return [::Google::Api::CommonLanguageSettings]
308
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
309
319
  class GoSettings
310
320
  include ::Google::Protobuf::MessageExts
311
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
312
331
  end
313
332
 
314
333
  # Describes the generator configuration for a method.
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-managed_kafka-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-12-04 00:00:00.000000000 Z
10
+ date: 2025-01-15 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: gapic-common
@@ -16,7 +15,7 @@ dependencies:
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
- version: 0.21.1
18
+ version: 0.24.0
20
19
  - - "<"
21
20
  - !ruby/object:Gem::Version
22
21
  version: 2.a
@@ -26,7 +25,7 @@ dependencies:
26
25
  requirements:
27
26
  - - ">="
28
27
  - !ruby/object:Gem::Version
29
- version: 0.21.1
28
+ version: 0.24.0
30
29
  - - "<"
31
30
  - !ruby/object:Gem::Version
32
31
  version: 2.a
@@ -113,7 +112,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
113
112
  licenses:
114
113
  - Apache-2.0
115
114
  metadata: {}
116
- post_install_message:
117
115
  rdoc_options: []
118
116
  require_paths:
119
117
  - lib
@@ -128,8 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
126
  - !ruby/object:Gem::Version
129
127
  version: '0'
130
128
  requirements: []
131
- rubygems_version: 3.5.22
132
- signing_key:
129
+ rubygems_version: 3.6.2
133
130
  specification_version: 4
134
131
  summary: Manage Apache Kafka clusters and resources.
135
132
  test_files: []