google-cloud-media_translation-v1beta1 0.9.1 → 0.11.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 +4 -4
- data/README.md +31 -21
- data/lib/google/cloud/media_translation/v1beta1/speech_translation_service/client.rb +34 -2
- data/lib/google/cloud/media_translation/v1beta1/version.rb +1 -1
- data/proto_docs/google/api/client.rb +39 -0
- data/proto_docs/google/cloud/mediatranslation/v1beta1/media_translation.rb +4 -0
- metadata +6 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5207f14a070bc0c83d5fa904fc2d14d47f16b63d8e8758d6983a8f98ff26769
|
4
|
+
data.tar.gz: 2c0fad4896834880a7e1842d31b10028ecc9b86f322ffd443c9e8be2725b02c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab4b270655719da7cd393a2685106b2417bf5073d82378b783fab35ab3bf156e948701bfc1d254a3e1d166050e5757115ac610c8f9477b278a14e7d9e7c53795
|
7
|
+
data.tar.gz: 4f0c52e240cd766b8f839c1148207450ab4560046e0d16739b10cb56b33fbba5e80ba5fab0b2546c0a056fcd16d16226240f9ff18d0a1182a5207bdeebe13648
|
data/README.md
CHANGED
@@ -39,40 +39,50 @@ 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
|
-
##
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
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
|
-
|
56
|
-
|
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).
|
72
82
|
|
73
83
|
## Supported Ruby Versions
|
74
84
|
|
75
|
-
This library is supported on Ruby
|
85
|
+
This library is supported on Ruby 3.0+.
|
76
86
|
|
77
87
|
Google provides official support for Ruby versions that are actively supported
|
78
88
|
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
|
@@ -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)
|
@@ -292,6 +311,13 @@ module Google
|
|
292
311
|
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
293
312
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
294
313
|
# * (`nil`) indicating no credentials
|
314
|
+
#
|
315
|
+
# Warning: If you accept a credential configuration (JSON file or Hash) from an
|
316
|
+
# external source for authentication to Google Cloud, you must validate it before
|
317
|
+
# providing it to a Google API client library. Providing an unvalidated credential
|
318
|
+
# configuration to Google APIs can compromise the security of your systems and data.
|
319
|
+
# For more information, refer to [Validate credential configurations from external
|
320
|
+
# sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials).
|
295
321
|
# @return [::Object]
|
296
322
|
# @!attribute [rw] scope
|
297
323
|
# The OAuth scopes
|
@@ -331,6 +357,11 @@ module Google
|
|
331
357
|
# default endpoint URL. The default value of nil uses the environment
|
332
358
|
# universe (usually the default "googleapis.com" universe).
|
333
359
|
# @return [::String,nil]
|
360
|
+
# @!attribute [rw] logger
|
361
|
+
# A custom logger to use for request/response debug logging, or the value
|
362
|
+
# `:default` (the default) to construct a default logger, or `nil` to
|
363
|
+
# explicitly disable logging.
|
364
|
+
# @return [::Logger,:default,nil]
|
334
365
|
#
|
335
366
|
class Configuration
|
336
367
|
extend ::Gapic::Config
|
@@ -355,6 +386,7 @@ module Google
|
|
355
386
|
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
356
387
|
config_attr :quota_project, nil, ::String, nil
|
357
388
|
config_attr :universe_domain, nil, ::String, nil
|
389
|
+
config_attr :logger, :default, ::Logger, nil, :default
|
358
390
|
|
359
391
|
# @private
|
360
392
|
def initialize parent_config = nil
|
@@ -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
|
@@ -118,6 +118,8 @@ module Google
|
|
118
118
|
# Provides information to the recognizer that specifies how to process the
|
119
119
|
# request. The first `StreamingTranslateSpeechRequest` message must contain
|
120
120
|
# a `streaming_config` message.
|
121
|
+
#
|
122
|
+
# Note: The following fields are mutually exclusive: `streaming_config`, `audio_content`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
121
123
|
# @!attribute [rw] audio_content
|
122
124
|
# @return [::String]
|
123
125
|
# The audio data to be translated. Sequential chunks of audio data are sent
|
@@ -128,6 +130,8 @@ module Google
|
|
128
130
|
# encoded as specified in `StreamingTranslateSpeechConfig`. Note: as with
|
129
131
|
# all bytes fields, protobuffers use a pure binary representation (not
|
130
132
|
# base64).
|
133
|
+
#
|
134
|
+
# Note: The following fields are mutually exclusive: `audio_content`, `streaming_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
131
135
|
class StreamingTranslateSpeechRequest
|
132
136
|
include ::Google::Protobuf::MessageExts
|
133
137
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-media_translation-v1beta1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-29 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.
|
18
|
+
version: 0.25.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.
|
28
|
+
version: 0.25.0
|
30
29
|
- - "<"
|
31
30
|
- !ruby/object:Gem::Version
|
32
31
|
version: 2.a
|
@@ -83,7 +82,6 @@ homepage: https://github.com/googleapis/google-cloud-ruby
|
|
83
82
|
licenses:
|
84
83
|
- Apache-2.0
|
85
84
|
metadata: {}
|
86
|
-
post_install_message:
|
87
85
|
rdoc_options: []
|
88
86
|
require_paths:
|
89
87
|
- lib
|
@@ -91,15 +89,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
89
|
requirements:
|
92
90
|
- - ">="
|
93
91
|
- !ruby/object:Gem::Version
|
94
|
-
version: '
|
92
|
+
version: '3.0'
|
95
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
94
|
requirements:
|
97
95
|
- - ">="
|
98
96
|
- !ruby/object:Gem::Version
|
99
97
|
version: '0'
|
100
98
|
requirements: []
|
101
|
-
rubygems_version: 3.
|
102
|
-
signing_key:
|
99
|
+
rubygems_version: 3.6.2
|
103
100
|
specification_version: 4
|
104
101
|
summary: API Client library for the Media Translation V1beta1 API
|
105
102
|
test_files: []
|