google-cloud-media_translation-v1beta1 0.9.1 → 0.10.0

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: 2b14b141dee1deb6f004295df59000a6f9cff57e5dadc47ada996ce5322fac0c
4
- data.tar.gz: 1180e3f0bb42d00045031e1cf662217953a95c8f8d9c5cc256aee43423814a5a
3
+ metadata.gz: 378730939139322f8693116d4074a4c38ac4fdb32bb8a6d025351d16d1f4086c
4
+ data.tar.gz: b2e36f9380bf0ab223ad528ffc3af9a0026b45072eba31d75dd7c7a03ea1030e
5
5
  SHA512:
6
- metadata.gz: f7e5e85bb05ccbe9add7deaea2eba5144e217f1bf7000dc1ffcee34f6865024b6ef4bf37197316fd4eaafa8a3689bc6333211c6ebd171f13ad5d681ada1600b2
7
- data.tar.gz: b9291a1d9084ce34c2bfc88fb7e105ffe7fa7a1109522d1bc38bcc0593d78b55b09c407cda42cd649608e7885925c2ef06857ea2e288d61b696fe553e3e9dcb6
6
+ metadata.gz: 3a0b00ebf02ff88d3bb5182876235b0aab6b3b8d446def569e164f34a89e11a0fcd6788322807513f6aebc8c0c99f0918941f4ea7f04fa6e0587e61f225e5157
7
+ data.tar.gz: 246ea82bd3c328c6552948e92d3afc2d4005077968cc6b231ea937bd9d22f2759a473c8994892b240ce4f74d3dba7df0560379e9b4c4c68f07f4d4231606b53c
data/README.md CHANGED
@@ -39,33 +39,43 @@ for class and method documentation.
39
39
  See also the [Product Documentation](https://cloud.google.com/media-translation/)
40
40
  for general usage information.
41
41
 
42
- ## Enabling Logging
43
-
44
- To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
45
- The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/current/stdlibs/logger/Logger.html) as shown below,
46
- or a [`Google::Cloud::Logging::Logger`](https://cloud.google.com/ruby/docs/reference/google-cloud-logging/latest)
47
- 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)
48
- and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
49
-
50
- Configuring a Ruby stdlib logger:
42
+ ## Debug Logging
43
+
44
+ This library comes with opt-in Debug Logging that can help you troubleshoot
45
+ your application's integration with the API. When logging is activated, key
46
+ events such as requests and responses, along with data payloads and metadata
47
+ such as headers and client configuration, are logged to the standard error
48
+ stream.
49
+
50
+ **WARNING:** Client Library Debug Logging includes your data payloads in
51
+ plaintext, which could include sensitive data such as PII for yourself or your
52
+ customers, private keys, or other security data that could be compromising if
53
+ leaked. Always practice good data hygiene with your application logs, and follow
54
+ the principle of least access. Google also recommends that Client Library Debug
55
+ Logging be enabled only temporarily during active debugging, and not used
56
+ permanently in production.
57
+
58
+ To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS`
59
+ to the value `all`. Alternatively, you can set the value to a comma-delimited
60
+ list of client library gem names. This will select the default logging behavior,
61
+ which writes logs to the standard error stream. On a local workstation, this may
62
+ result in logs appearing on the console. When running on a Google Cloud hosting
63
+ service such as [Google Cloud Run](https://cloud.google.com/run), this generally
64
+ results in logs appearing alongside your application logs in the
65
+ [Google Cloud Logging](https://cloud.google.com/logging/) service.
66
+
67
+ You can customize logging by modifying the `logger` configuration when
68
+ constructing a client object. For example:
51
69
 
52
70
  ```ruby
71
+ require "google/cloud/media_translation/v1beta1"
53
72
  require "logger"
54
73
 
55
- module MyLogger
56
- LOGGER = Logger.new $stderr, level: Logger::WARN
57
- def logger
58
- LOGGER
59
- end
60
- end
61
-
62
- # Define a gRPC module-level logger method before grpc/logconfig.rb loads.
63
- module GRPC
64
- extend MyLogger
74
+ client = ::Google::Cloud::MediaTranslation::V1beta1::SpeechTranslationService::Client.new do |config|
75
+ config.logger = Logger.new "my-app.log"
65
76
  end
66
77
  ```
67
78
 
68
-
69
79
  ## Google Cloud Samples
70
80
 
71
81
  To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples).
@@ -162,8 +162,28 @@ module Google
162
162
  universe_domain: @config.universe_domain,
163
163
  channel_args: @config.channel_args,
164
164
  interceptors: @config.interceptors,
165
- channel_pool_config: @config.channel_pool
165
+ channel_pool_config: @config.channel_pool,
166
+ logger: @config.logger
166
167
  )
168
+
169
+ @speech_translation_service_stub.stub_logger&.info do |entry|
170
+ entry.set_system_name
171
+ entry.set_service
172
+ entry.message = "Created client for #{entry.service}"
173
+ entry.set_credentials_fields credentials
174
+ entry.set "customEndpoint", @config.endpoint if @config.endpoint
175
+ entry.set "defaultTimeout", @config.timeout if @config.timeout
176
+ entry.set "quotaProject", @quota_project_id if @quota_project_id
177
+ end
178
+ end
179
+
180
+ ##
181
+ # The logger used for request/response debug logging.
182
+ #
183
+ # @return [Logger]
184
+ #
185
+ def logger
186
+ @speech_translation_service_stub.logger
167
187
  end
168
188
 
169
189
  # Service calls
@@ -242,7 +262,6 @@ module Google
242
262
 
243
263
  @speech_translation_service_stub.call_rpc :streaming_translate_speech, request, options: options do |response, operation|
244
264
  yield response, operation if block_given?
245
- return response
246
265
  end
247
266
  rescue ::GRPC::BadStatus => e
248
267
  raise ::Google::Cloud::Error.from_error(e)
@@ -331,6 +350,11 @@ module Google
331
350
  # default endpoint URL. The default value of nil uses the environment
332
351
  # universe (usually the default "googleapis.com" universe).
333
352
  # @return [::String,nil]
353
+ # @!attribute [rw] logger
354
+ # A custom logger to use for request/response debug logging, or the value
355
+ # `:default` (the default) to construct a default logger, or `nil` to
356
+ # explicitly disable logging.
357
+ # @return [::Logger,:default,nil]
334
358
  #
335
359
  class Configuration
336
360
  extend ::Gapic::Config
@@ -355,6 +379,7 @@ module Google
355
379
  config_attr :retry_policy, nil, ::Hash, ::Proc, nil
356
380
  config_attr :quota_project, nil, ::String, nil
357
381
  config_attr :universe_domain, nil, ::String, nil
382
+ config_attr :logger, :default, ::Logger, nil, :default
358
383
 
359
384
  # @private
360
385
  def initialize parent_config = nil
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module MediaTranslation
23
23
  module V1beta1
24
- VERSION = "0.9.1"
24
+ VERSION = "0.10.0"
25
25
  end
26
26
  end
27
27
  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
@@ -212,6 +215,12 @@ module Google
212
215
  # enabled. By default, asynchronous REST clients will not be generated.
213
216
  # This feature will be enabled by default 1 month after launching the
214
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.
215
224
  class ExperimentalFeatures
216
225
  include ::Google::Protobuf::MessageExts
217
226
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -297,9 +306,28 @@ module Google
297
306
  # @!attribute [rw] common
298
307
  # @return [::Google::Api::CommonLanguageSettings]
299
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
300
319
  class GoSettings
301
320
  include ::Google::Protobuf::MessageExts
302
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
303
331
  end
304
332
 
305
333
  # Describes the generator configuration for a method.
@@ -375,6 +403,17 @@ module Google
375
403
  end
376
404
  end
377
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
+
378
417
  # The organization for which the client libraries are being published.
379
418
  # Affects the url where generated docs are published, etc.
380
419
  module ClientLibraryOrganization
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-media_translation-v1beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.10.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-08-30 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
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  requirements: []
101
- rubygems_version: 3.5.6
101
+ rubygems_version: 3.5.23
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: API Client library for the Media Translation V1beta1 API