google-apis-translate_v3 0.27.0 → 0.28.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: e97ad54acfc36b4ef0de2d944c34c3f211ea9554d8ec6be45153b83688db9be4
4
- data.tar.gz: c417053c9a5c35f5b3f3378f8cd8286c8eda0a22e5403d5ad4674475f3ff0349
3
+ metadata.gz: 4862fdc6ea70f4c7d5d49dd3581df9adcd207f5245eab90652d998a61697d0a4
4
+ data.tar.gz: fc582936102256b4402f8de9e679a26d705906a28b9f4b6cdd545f759884f4f5
5
5
  SHA512:
6
- metadata.gz: 2506619bae65879a34364cdd9b10af8a963915166cf000aa0a6bb8e22ba760b4e40238b51678753ca8b9486b6d3133752a9db4ff9776df8a2654093abfb34899
7
- data.tar.gz: e52a647ed8cc655a95fd3925566e570fb8c8f541d57df861dbdd9a06bf3261c3cd1f459dc798d850919f1a7b23e0c47cd875b4b8ec3854735fce99af22dc8da7
6
+ metadata.gz: fa36582feac5a1f76ee12105c2220881afee0328d710e5a3a9007937896665230c7ebd9eab99b8dcd509ccf8ba811acaf8e9f05a1e26329f2ab689f2480c7173
7
+ data.tar.gz: 5eb7a010615fef9f263594e1f094016dfd3e97c96f7136cec86ef64d05eb1ffd30179f3d26adb05a8df58082c5687086d68d68525b0cfd9fc04b48bebb9dc0fd
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release history for google-apis-translate_v3
2
2
 
3
+ ### v0.28.0 (2023-05-28)
4
+
5
+ * Regenerated from discovery document revision 20230519
6
+
3
7
  ### v0.27.0 (2023-05-07)
4
8
 
5
9
  * Regenerated from discovery document revision 20230428
@@ -1396,6 +1396,82 @@ module Google
1396
1396
  end
1397
1397
  end
1398
1398
 
1399
+ # A single romanization response.
1400
+ class Romanization
1401
+ include Google::Apis::Core::Hashable
1402
+
1403
+ # The ISO-639 language code of source text in the initial request, detected
1404
+ # automatically, if no source language was passed within the initial request. If
1405
+ # the source language was passed, auto-detection of the language does not occur
1406
+ # and this field is empty.
1407
+ # Corresponds to the JSON property `detectedLanguageCode`
1408
+ # @return [String]
1409
+ attr_accessor :detected_language_code
1410
+
1411
+ # Romanized text. If an error occurs during romanization, this field might be
1412
+ # excluded from the response.
1413
+ # Corresponds to the JSON property `romanizedText`
1414
+ # @return [String]
1415
+ attr_accessor :romanized_text
1416
+
1417
+ def initialize(**args)
1418
+ update!(**args)
1419
+ end
1420
+
1421
+ # Update properties of this object
1422
+ def update!(**args)
1423
+ @detected_language_code = args[:detected_language_code] if args.key?(:detected_language_code)
1424
+ @romanized_text = args[:romanized_text] if args.key?(:romanized_text)
1425
+ end
1426
+ end
1427
+
1428
+ # The request message for synchronous romanization.
1429
+ class RomanizeTextRequest
1430
+ include Google::Apis::Core::Hashable
1431
+
1432
+ # Required. The content of the input in string format.
1433
+ # Corresponds to the JSON property `contents`
1434
+ # @return [Array<String>]
1435
+ attr_accessor :contents
1436
+
1437
+ # Optional. The ISO-639 language code of the input text if known, for example, "
1438
+ # hi" or "zh". If the source language isn't specified, the API attempts to
1439
+ # identify the source language automatically and returns the source language for
1440
+ # each content in the response.
1441
+ # Corresponds to the JSON property `sourceLanguageCode`
1442
+ # @return [String]
1443
+ attr_accessor :source_language_code
1444
+
1445
+ def initialize(**args)
1446
+ update!(**args)
1447
+ end
1448
+
1449
+ # Update properties of this object
1450
+ def update!(**args)
1451
+ @contents = args[:contents] if args.key?(:contents)
1452
+ @source_language_code = args[:source_language_code] if args.key?(:source_language_code)
1453
+ end
1454
+ end
1455
+
1456
+ # The response message for synchronous romanization.
1457
+ class RomanizeTextResponse
1458
+ include Google::Apis::Core::Hashable
1459
+
1460
+ # Text romanization responses. This field has the same length as `contents`.
1461
+ # Corresponds to the JSON property `romanizations`
1462
+ # @return [Array<Google::Apis::TranslateV3::Romanization>]
1463
+ attr_accessor :romanizations
1464
+
1465
+ def initialize(**args)
1466
+ update!(**args)
1467
+ end
1468
+
1469
+ # Update properties of this object
1470
+ def update!(**args)
1471
+ @romanizations = args[:romanizations] if args.key?(:romanizations)
1472
+ end
1473
+ end
1474
+
1399
1475
  # The `Status` type defines a logical error model that is suitable for different
1400
1476
  # programming environments, including REST APIs and RPC APIs. It is used by [
1401
1477
  # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
@@ -1734,6 +1810,11 @@ module Google
1734
1810
  # @return [String]
1735
1811
  attr_accessor :target_language_code
1736
1812
 
1813
+ # Confugures transliteration feature on top of translation.
1814
+ # Corresponds to the JSON property `transliterationConfig`
1815
+ # @return [Google::Apis::TranslateV3::TransliterationConfig]
1816
+ attr_accessor :transliteration_config
1817
+
1737
1818
  def initialize(**args)
1738
1819
  update!(**args)
1739
1820
  end
@@ -1747,6 +1828,7 @@ module Google
1747
1828
  @model = args[:model] if args.key?(:model)
1748
1829
  @source_language_code = args[:source_language_code] if args.key?(:source_language_code)
1749
1830
  @target_language_code = args[:target_language_code] if args.key?(:target_language_code)
1831
+ @transliteration_config = args[:transliteration_config] if args.key?(:transliteration_config)
1750
1832
  end
1751
1833
  end
1752
1834
 
@@ -1824,6 +1906,27 @@ module Google
1824
1906
  end
1825
1907
  end
1826
1908
 
1909
+ # Confugures transliteration feature on top of translation.
1910
+ class TransliterationConfig
1911
+ include Google::Apis::Core::Hashable
1912
+
1913
+ # If true, source text in romanized form can be translated to the target
1914
+ # language.
1915
+ # Corresponds to the JSON property `enableTransliteration`
1916
+ # @return [Boolean]
1917
+ attr_accessor :enable_transliteration
1918
+ alias_method :enable_transliteration?, :enable_transliteration
1919
+
1920
+ def initialize(**args)
1921
+ update!(**args)
1922
+ end
1923
+
1924
+ # Update properties of this object
1925
+ def update!(**args)
1926
+ @enable_transliteration = args[:enable_transliteration] if args.key?(:enable_transliteration)
1927
+ end
1928
+ end
1929
+
1827
1930
  # The request message for Operations.WaitOperation.
1828
1931
  class WaitOperationRequest
1829
1932
  include Google::Apis::Core::Hashable
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module TranslateV3
18
18
  # Version of the google-apis-translate_v3 gem
19
- GEM_VERSION = "0.27.0"
19
+ GEM_VERSION = "0.28.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
22
  GENERATOR_VERSION = "0.12.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20230428"
25
+ REVISION = "20230519"
26
26
  end
27
27
  end
28
28
  end
@@ -280,6 +280,24 @@ module Google
280
280
  include Google::Apis::Core::JsonObjectSupport
281
281
  end
282
282
 
283
+ class Romanization
284
+ class Representation < Google::Apis::Core::JsonRepresentation; end
285
+
286
+ include Google::Apis::Core::JsonObjectSupport
287
+ end
288
+
289
+ class RomanizeTextRequest
290
+ class Representation < Google::Apis::Core::JsonRepresentation; end
291
+
292
+ include Google::Apis::Core::JsonObjectSupport
293
+ end
294
+
295
+ class RomanizeTextResponse
296
+ class Representation < Google::Apis::Core::JsonRepresentation; end
297
+
298
+ include Google::Apis::Core::JsonObjectSupport
299
+ end
300
+
283
301
  class Status
284
302
  class Representation < Google::Apis::Core::JsonRepresentation; end
285
303
 
@@ -334,6 +352,12 @@ module Google
334
352
  include Google::Apis::Core::JsonObjectSupport
335
353
  end
336
354
 
355
+ class TransliterationConfig
356
+ class Representation < Google::Apis::Core::JsonRepresentation; end
357
+
358
+ include Google::Apis::Core::JsonObjectSupport
359
+ end
360
+
337
361
  class WaitOperationRequest
338
362
  class Representation < Google::Apis::Core::JsonRepresentation; end
339
363
 
@@ -748,6 +772,30 @@ module Google
748
772
  end
749
773
  end
750
774
 
775
+ class Romanization
776
+ # @private
777
+ class Representation < Google::Apis::Core::JsonRepresentation
778
+ property :detected_language_code, as: 'detectedLanguageCode'
779
+ property :romanized_text, as: 'romanizedText'
780
+ end
781
+ end
782
+
783
+ class RomanizeTextRequest
784
+ # @private
785
+ class Representation < Google::Apis::Core::JsonRepresentation
786
+ collection :contents, as: 'contents'
787
+ property :source_language_code, as: 'sourceLanguageCode'
788
+ end
789
+ end
790
+
791
+ class RomanizeTextResponse
792
+ # @private
793
+ class Representation < Google::Apis::Core::JsonRepresentation
794
+ collection :romanizations, as: 'romanizations', class: Google::Apis::TranslateV3::Romanization, decorator: Google::Apis::TranslateV3::Romanization::Representation
795
+
796
+ end
797
+ end
798
+
751
799
  class Status
752
800
  # @private
753
801
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -827,6 +875,8 @@ module Google
827
875
  property :model, as: 'model'
828
876
  property :source_language_code, as: 'sourceLanguageCode'
829
877
  property :target_language_code, as: 'targetLanguageCode'
878
+ property :transliteration_config, as: 'transliterationConfig', class: Google::Apis::TranslateV3::TransliterationConfig, decorator: Google::Apis::TranslateV3::TransliterationConfig::Representation
879
+
830
880
  end
831
881
  end
832
882
 
@@ -851,6 +901,13 @@ module Google
851
901
  end
852
902
  end
853
903
 
904
+ class TransliterationConfig
905
+ # @private
906
+ class Representation < Google::Apis::Core::JsonRepresentation
907
+ property :enable_transliteration, as: 'enableTransliteration'
908
+ end
909
+ end
910
+
854
911
  class WaitOperationRequest
855
912
  # @private
856
913
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -136,6 +136,42 @@ module Google
136
136
  execute_or_queue_command(command, &block)
137
137
  end
138
138
 
139
+ # Romanize input text written in non-Latin scripts to Latin text.
140
+ # @param [String] parent
141
+ # Required. Project or location to make a call. Must refer to a caller's project.
142
+ # Format: `projects/`project-number-or-id`/locations/`location-id`` or `
143
+ # projects/`project-number-or-id``. For global calls, use `projects/`project-
144
+ # number-or-id`/locations/global` or `projects/`project-number-or-id``.
145
+ # @param [Google::Apis::TranslateV3::RomanizeTextRequest] romanize_text_request_object
146
+ # @param [String] fields
147
+ # Selector specifying which fields to include in a partial response.
148
+ # @param [String] quota_user
149
+ # Available to use for quota purposes for server-side applications. Can be any
150
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
151
+ # @param [Google::Apis::RequestOptions] options
152
+ # Request-specific options
153
+ #
154
+ # @yield [result, err] Result & error if block supplied
155
+ # @yieldparam result [Google::Apis::TranslateV3::RomanizeTextResponse] parsed result object
156
+ # @yieldparam err [StandardError] error object if request failed
157
+ #
158
+ # @return [Google::Apis::TranslateV3::RomanizeTextResponse]
159
+ #
160
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
161
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
162
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
163
+ def romanize_project_text(parent, romanize_text_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
164
+ command = make_simple_command(:post, 'v3/{+parent}:romanizeText', options)
165
+ command.request_representation = Google::Apis::TranslateV3::RomanizeTextRequest::Representation
166
+ command.request_object = romanize_text_request_object
167
+ command.response_representation = Google::Apis::TranslateV3::RomanizeTextResponse::Representation
168
+ command.response_class = Google::Apis::TranslateV3::RomanizeTextResponse
169
+ command.params['parent'] = parent unless parent.nil?
170
+ command.query['fields'] = fields unless fields.nil?
171
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
172
+ execute_or_queue_command(command, &block)
173
+ end
174
+
139
175
  # Translates input text and returns translated text.
140
176
  # @param [String] parent
141
177
  # Required. Project or location to make a call. Must refer to a caller's project.
@@ -419,6 +455,42 @@ module Google
419
455
  execute_or_queue_command(command, &block)
420
456
  end
421
457
 
458
+ # Romanize input text written in non-Latin scripts to Latin text.
459
+ # @param [String] parent
460
+ # Required. Project or location to make a call. Must refer to a caller's project.
461
+ # Format: `projects/`project-number-or-id`/locations/`location-id`` or `
462
+ # projects/`project-number-or-id``. For global calls, use `projects/`project-
463
+ # number-or-id`/locations/global` or `projects/`project-number-or-id``.
464
+ # @param [Google::Apis::TranslateV3::RomanizeTextRequest] romanize_text_request_object
465
+ # @param [String] fields
466
+ # Selector specifying which fields to include in a partial response.
467
+ # @param [String] quota_user
468
+ # Available to use for quota purposes for server-side applications. Can be any
469
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
470
+ # @param [Google::Apis::RequestOptions] options
471
+ # Request-specific options
472
+ #
473
+ # @yield [result, err] Result & error if block supplied
474
+ # @yieldparam result [Google::Apis::TranslateV3::RomanizeTextResponse] parsed result object
475
+ # @yieldparam err [StandardError] error object if request failed
476
+ #
477
+ # @return [Google::Apis::TranslateV3::RomanizeTextResponse]
478
+ #
479
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
480
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
481
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
482
+ def romanize_location_text(parent, romanize_text_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
483
+ command = make_simple_command(:post, 'v3/{+parent}:romanizeText', options)
484
+ command.request_representation = Google::Apis::TranslateV3::RomanizeTextRequest::Representation
485
+ command.request_object = romanize_text_request_object
486
+ command.response_representation = Google::Apis::TranslateV3::RomanizeTextResponse::Representation
487
+ command.response_class = Google::Apis::TranslateV3::RomanizeTextResponse
488
+ command.params['parent'] = parent unless parent.nil?
489
+ command.query['fields'] = fields unless fields.nil?
490
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
491
+ execute_or_queue_command(command, &block)
492
+ end
493
+
422
494
  # Translates documents in synchronous mode.
423
495
  # @param [String] parent
424
496
  # Required. Location to make a regional call. Format: `projects/`project-number-
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-translate_v3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.0
4
+ version: 0.28.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: 2023-05-14 00:00:00.000000000 Z
11
+ date: 2023-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-apis-core
@@ -58,7 +58,7 @@ licenses:
58
58
  metadata:
59
59
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
60
60
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-translate_v3/CHANGELOG.md
61
- documentation_uri: https://googleapis.dev/ruby/google-apis-translate_v3/v0.27.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-translate_v3/v0.28.0
62
62
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-translate_v3
63
63
  post_install_message:
64
64
  rdoc_options: []