google-apis-translate_v3beta1 0.35.0 → 0.37.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: 7fe10ef0116c4a63238d0b78109de7597df2918f0d652cc436af35b67c4c29df
4
- data.tar.gz: '058c2f8b01ba1c39753d3cf90ed0169125593b4912eb75f43bf7c04b9c7915c7'
3
+ metadata.gz: 5243e3a329c02c93e275712d1af7a5a2cff2d8e6a60eb4331932ff350daee66a
4
+ data.tar.gz: 1fe2e55d7c5b7ea479e2357ff488bffbc23fd2ba9e313df608f11af3ee59939c
5
5
  SHA512:
6
- metadata.gz: af26357863ef5471ce9f9177482790a1670e697ac50245a8a45ca1a1485eb244dfca01e0ef7713fcba396b6c8657ad1f62ebf03cce36b709b8052bb3a72585d1
7
- data.tar.gz: cdcfdbef0708ea807e929da6865f3d5d6697b5b9538bfce72d984fc5d425fe154afc4a8d98e340553c04f3c2909e6fbeec3cc60e0691837cba8e4f84a150432b
6
+ metadata.gz: 924372c28b3ebff0651a73dd971bfaa3bf9b18742281992689bac014b4596dc5d6160e4c7e9491ee58460de5e9f482d73d46b005902c797c3640420e59403753
7
+ data.tar.gz: c69755d6e00648c49f3ede42c99bacfcd7ea927160ef1cc73a3fa715c89a47839713d7160217d21c05e64877e60d9d6d7d9718ecbac9c6f1351523d7cf0f2b46
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Release history for google-apis-translate_v3beta1
2
2
 
3
+ ### v0.37.0 (2026-02-01)
4
+
5
+ * Regenerated from discovery document revision 20260128
6
+
7
+ ### v0.36.0 (2026-01-11)
8
+
9
+ * Regenerated from discovery document revision 20260108
10
+ * Regenerated using generator version 0.18.0
11
+
3
12
  ### v0.35.0 (2025-05-04)
4
13
 
5
14
  * Regenerated from discovery document revision 20250424
@@ -125,6 +125,12 @@ module Google
125
125
  # @return [Google::Apis::TranslateV3beta1::BatchDocumentOutputConfig]
126
126
  attr_accessor :output_config
127
127
 
128
+ # Optional. If true, only native pdf pages will be translated.
129
+ # Corresponds to the JSON property `pdfNativeOnly`
130
+ # @return [Boolean]
131
+ attr_accessor :pdf_native_only
132
+ alias_method :pdf_native_only?, :pdf_native_only
133
+
128
134
  # Required. The BCP-47 language code of the input document if known, for example,
129
135
  # "en-US" or "sr-Latn". Supported language codes are listed in [Language
130
136
  # Support](https://cloud.google.com/translate/docs/languages).
@@ -133,7 +139,9 @@ module Google
133
139
  attr_accessor :source_language_code
134
140
 
135
141
  # Required. The BCP-47 language code to use for translation of the input
136
- # document. Specify up to 10 language codes here.
142
+ # document. Specify up to 10 language codes here. Supported language codes are
143
+ # listed in [Language Support](https://cloud.google.com/translate/docs/languages)
144
+ # .
137
145
  # Corresponds to the JSON property `targetLanguageCodes`
138
146
  # @return [Array<String>]
139
147
  attr_accessor :target_language_codes
@@ -152,6 +160,7 @@ module Google
152
160
  @input_configs = args[:input_configs] if args.key?(:input_configs)
153
161
  @models = args[:models] if args.key?(:models)
154
162
  @output_config = args[:output_config] if args.key?(:output_config)
163
+ @pdf_native_only = args[:pdf_native_only] if args.key?(:pdf_native_only)
155
164
  @source_language_code = args[:source_language_code] if args.key?(:source_language_code)
156
165
  @target_language_codes = args[:target_language_codes] if args.key?(:target_language_codes)
157
166
  end
@@ -201,12 +210,15 @@ module Google
201
210
  # @return [Google::Apis::TranslateV3beta1::OutputConfig]
202
211
  attr_accessor :output_config
203
212
 
204
- # Required. Source language code.
213
+ # Required. Source language code. Supported language codes are listed in [
214
+ # Language Support](https://cloud.google.com/translate/docs/languages).
205
215
  # Corresponds to the JSON property `sourceLanguageCode`
206
216
  # @return [String]
207
217
  attr_accessor :source_language_code
208
218
 
209
- # Required. Specify up to 10 language codes here.
219
+ # Required. Specify up to 10 language codes here. Supported language codes are
220
+ # listed in [Language Support](https://cloud.google.com/translate/docs/languages)
221
+ # .
210
222
  # Corresponds to the JSON property `targetLanguageCodes`
211
223
  # @return [Array<String>]
212
224
  attr_accessor :target_language_codes
@@ -711,6 +723,14 @@ module Google
711
723
  # @return [Array<Google::Apis::TranslateV3beta1::Operation>]
712
724
  attr_accessor :operations
713
725
 
726
+ # Unordered list. Unreachable resources. Populated when the request sets `
727
+ # ListOperationsRequest.return_partial_success` and reads across collections.
728
+ # For example, when attempting to list all resources across all supported
729
+ # locations.
730
+ # Corresponds to the JSON property `unreachable`
731
+ # @return [Array<String>]
732
+ attr_accessor :unreachable
733
+
714
734
  def initialize(**args)
715
735
  update!(**args)
716
736
  end
@@ -719,6 +739,7 @@ module Google
719
739
  def update!(**args)
720
740
  @next_page_token = args[:next_page_token] if args.key?(:next_page_token)
721
741
  @operations = args[:operations] if args.key?(:operations)
742
+ @unreachable = args[:unreachable] if args.key?(:unreachable)
722
743
  end
723
744
  end
724
745
 
@@ -850,6 +871,84 @@ module Google
850
871
  end
851
872
  end
852
873
 
874
+ # Request message for RefineText.
875
+ class RefineTextRequest
876
+ include Google::Apis::Core::Hashable
877
+
878
+ # Required. The source texts and original translations in the source and target
879
+ # languages.
880
+ # Corresponds to the JSON property `refinementEntries`
881
+ # @return [Array<Google::Apis::TranslateV3beta1::RefinementEntry>]
882
+ attr_accessor :refinement_entries
883
+
884
+ # Required. The BCP-47 language code of the source text in the request, for
885
+ # example, "en-US".
886
+ # Corresponds to the JSON property `sourceLanguageCode`
887
+ # @return [String]
888
+ attr_accessor :source_language_code
889
+
890
+ # Required. The BCP-47 language code for translation output, for example, "zh-CN"
891
+ # .
892
+ # Corresponds to the JSON property `targetLanguageCode`
893
+ # @return [String]
894
+ attr_accessor :target_language_code
895
+
896
+ def initialize(**args)
897
+ update!(**args)
898
+ end
899
+
900
+ # Update properties of this object
901
+ def update!(**args)
902
+ @refinement_entries = args[:refinement_entries] if args.key?(:refinement_entries)
903
+ @source_language_code = args[:source_language_code] if args.key?(:source_language_code)
904
+ @target_language_code = args[:target_language_code] if args.key?(:target_language_code)
905
+ end
906
+ end
907
+
908
+ # Response message for RefineText.
909
+ class RefineTextResponse
910
+ include Google::Apis::Core::Hashable
911
+
912
+ # The refined translations obtained from the original translations.
913
+ # Corresponds to the JSON property `refinedTranslations`
914
+ # @return [Array<String>]
915
+ attr_accessor :refined_translations
916
+
917
+ def initialize(**args)
918
+ update!(**args)
919
+ end
920
+
921
+ # Update properties of this object
922
+ def update!(**args)
923
+ @refined_translations = args[:refined_translations] if args.key?(:refined_translations)
924
+ end
925
+ end
926
+
927
+ # A single refinement entry for RefineTextRequest.
928
+ class RefinementEntry
929
+ include Google::Apis::Core::Hashable
930
+
931
+ # Required. The original translation of the source text.
932
+ # Corresponds to the JSON property `originalTranslation`
933
+ # @return [String]
934
+ attr_accessor :original_translation
935
+
936
+ # Required. The source text to be refined.
937
+ # Corresponds to the JSON property `sourceText`
938
+ # @return [String]
939
+ attr_accessor :source_text
940
+
941
+ def initialize(**args)
942
+ update!(**args)
943
+ end
944
+
945
+ # Update properties of this object
946
+ def update!(**args)
947
+ @original_translation = args[:original_translation] if args.key?(:original_translation)
948
+ @source_text = args[:source_text] if args.key?(:source_text)
949
+ end
950
+ end
951
+
853
952
  # The `Status` type defines a logical error model that is suitable for different
854
953
  # programming environments, including REST APIs and RPC APIs. It is used by [
855
954
  # gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
@@ -988,7 +1087,6 @@ module Google
988
1087
  attr_accessor :enable_shadow_removal_native_pdf
989
1088
  alias_method :enable_shadow_removal_native_pdf?, :enable_shadow_removal_native_pdf
990
1089
 
991
- # -----------------------------------------------------------------------------
992
1090
  # Configures which glossary should be used for a specific target language, and
993
1091
  # defines options for applying that glossary.
994
1092
  # Corresponds to the JSON property `glossaryConfig`
@@ -1023,17 +1121,19 @@ module Google
1023
1121
  attr_accessor :model
1024
1122
 
1025
1123
  # Optional. The BCP-47 language code of the input document if known, for example,
1026
- # "en-US" or "sr-Latn". Supported language codes are listed in Language Support.
1027
- # If the source language isn't specified, the API attempts to identify the
1028
- # source language automatically and returns the source language within the
1029
- # response. Source language must be specified if the request contains a glossary
1030
- # or a custom model.
1124
+ # "en-US" or "sr-Latn". Supported language codes are listed in [Language
1125
+ # Support](https://cloud.google.com/translate/docs/languages). If the source
1126
+ # language isn't specified, the API attempts to identify the source language
1127
+ # automatically and returns the source language within the response. Source
1128
+ # language must be specified if the request contains a glossary or a custom
1129
+ # model.
1031
1130
  # Corresponds to the JSON property `sourceLanguageCode`
1032
1131
  # @return [String]
1033
1132
  attr_accessor :source_language_code
1034
1133
 
1035
1134
  # Required. The BCP-47 language code to use for translation of the input
1036
- # document, set to one of the language codes listed in Language Support.
1135
+ # document, set to one of the language codes listed in [Language Support](https:/
1136
+ # /cloud.google.com/translate/docs/languages).
1037
1137
  # Corresponds to the JSON property `targetLanguageCode`
1038
1138
  # @return [String]
1039
1139
  attr_accessor :target_language_code
@@ -1067,7 +1167,6 @@ module Google
1067
1167
  # @return [Google::Apis::TranslateV3beta1::DocumentTranslation]
1068
1168
  attr_accessor :document_translation
1069
1169
 
1070
- # -----------------------------------------------------------------------------
1071
1170
  # Configures which glossary should be used for a specific target language, and
1072
1171
  # defines options for applying that glossary.
1073
1172
  # Corresponds to the JSON property `glossaryConfig`
@@ -1101,7 +1200,6 @@ module Google
1101
1200
  end
1102
1201
  end
1103
1202
 
1104
- # -----------------------------------------------------------------------------
1105
1203
  # Configures which glossary should be used for a specific target language, and
1106
1204
  # defines options for applying that glossary.
1107
1205
  class TranslateTextGlossaryConfig
@@ -1149,7 +1247,6 @@ module Google
1149
1247
  # @return [Array<String>]
1150
1248
  attr_accessor :contents
1151
1249
 
1152
- # -----------------------------------------------------------------------------
1153
1250
  # Configures which glossary should be used for a specific target language, and
1154
1251
  # defines options for applying that glossary.
1155
1252
  # Corresponds to the JSON property `glossaryConfig`
@@ -1184,16 +1281,17 @@ module Google
1184
1281
  attr_accessor :model
1185
1282
 
1186
1283
  # Optional. The BCP-47 language code of the input text if known, for example, "
1187
- # en-US" or "sr-Latn". Supported language codes are listed in Language Support.
1188
- # If the source language isn't specified, the API attempts to identify the
1189
- # source language automatically and returns the source language within the
1190
- # response.
1284
+ # en-US" or "sr-Latn". Supported language codes are listed in [Language Support](
1285
+ # https://cloud.google.com/translate/docs/languages). If the source language isn'
1286
+ # t specified, the API attempts to identify the source language automatically
1287
+ # and returns the source language within the response.
1191
1288
  # Corresponds to the JSON property `sourceLanguageCode`
1192
1289
  # @return [String]
1193
1290
  attr_accessor :source_language_code
1194
1291
 
1195
1292
  # Required. The BCP-47 language code to use for translation of the input text,
1196
- # set to one of the language codes listed in Language Support.
1293
+ # set to one of the language codes listed in [Language Support](https://cloud.
1294
+ # google.com/translate/docs/languages).
1197
1295
  # Corresponds to the JSON property `targetLanguageCode`
1198
1296
  # @return [String]
1199
1297
  attr_accessor :target_language_code
@@ -1254,7 +1352,6 @@ module Google
1254
1352
  # @return [String]
1255
1353
  attr_accessor :detected_language_code
1256
1354
 
1257
- # -----------------------------------------------------------------------------
1258
1355
  # Configures which glossary should be used for a specific target language, and
1259
1356
  # defines options for applying that glossary.
1260
1357
  # Corresponds to the JSON property `glossaryConfig`
@@ -16,13 +16,13 @@ module Google
16
16
  module Apis
17
17
  module TranslateV3beta1
18
18
  # Version of the google-apis-translate_v3beta1 gem
19
- GEM_VERSION = "0.35.0"
19
+ GEM_VERSION = "0.37.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.17.0"
22
+ GENERATOR_VERSION = "0.18.0"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20250424"
25
+ REVISION = "20260128"
26
26
  end
27
27
  end
28
28
  end
@@ -172,6 +172,24 @@ module Google
172
172
  include Google::Apis::Core::JsonObjectSupport
173
173
  end
174
174
 
175
+ class RefineTextRequest
176
+ class Representation < Google::Apis::Core::JsonRepresentation; end
177
+
178
+ include Google::Apis::Core::JsonObjectSupport
179
+ end
180
+
181
+ class RefineTextResponse
182
+ class Representation < Google::Apis::Core::JsonRepresentation; end
183
+
184
+ include Google::Apis::Core::JsonObjectSupport
185
+ end
186
+
187
+ class RefinementEntry
188
+ class Representation < Google::Apis::Core::JsonRepresentation; end
189
+
190
+ include Google::Apis::Core::JsonObjectSupport
191
+ end
192
+
175
193
  class Status
176
194
  class Representation < Google::Apis::Core::JsonRepresentation; end
177
195
 
@@ -262,6 +280,7 @@ module Google
262
280
  hash :models, as: 'models'
263
281
  property :output_config, as: 'outputConfig', class: Google::Apis::TranslateV3beta1::BatchDocumentOutputConfig, decorator: Google::Apis::TranslateV3beta1::BatchDocumentOutputConfig::Representation
264
282
 
283
+ property :pdf_native_only, as: 'pdfNativeOnly'
265
284
  property :source_language_code, as: 'sourceLanguageCode'
266
285
  collection :target_language_codes, as: 'targetLanguageCodes'
267
286
  end
@@ -435,6 +454,7 @@ module Google
435
454
  property :next_page_token, as: 'nextPageToken'
436
455
  collection :operations, as: 'operations', class: Google::Apis::TranslateV3beta1::Operation, decorator: Google::Apis::TranslateV3beta1::Operation::Representation
437
456
 
457
+ collection :unreachable, as: 'unreachable'
438
458
  end
439
459
  end
440
460
 
@@ -469,6 +489,31 @@ module Google
469
489
  end
470
490
  end
471
491
 
492
+ class RefineTextRequest
493
+ # @private
494
+ class Representation < Google::Apis::Core::JsonRepresentation
495
+ collection :refinement_entries, as: 'refinementEntries', class: Google::Apis::TranslateV3beta1::RefinementEntry, decorator: Google::Apis::TranslateV3beta1::RefinementEntry::Representation
496
+
497
+ property :source_language_code, as: 'sourceLanguageCode'
498
+ property :target_language_code, as: 'targetLanguageCode'
499
+ end
500
+ end
501
+
502
+ class RefineTextResponse
503
+ # @private
504
+ class Representation < Google::Apis::Core::JsonRepresentation
505
+ collection :refined_translations, as: 'refinedTranslations'
506
+ end
507
+ end
508
+
509
+ class RefinementEntry
510
+ # @private
511
+ class Representation < Google::Apis::Core::JsonRepresentation
512
+ property :original_translation, as: 'originalTranslation'
513
+ property :source_text, as: 'sourceText'
514
+ end
515
+ end
516
+
472
517
  class Status
473
518
  # @private
474
519
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -378,12 +378,16 @@ module Google
378
378
  execute_or_queue_command(command, &block)
379
379
  end
380
380
 
381
- # Lists information about the supported locations for this service.
381
+ # Lists information about the supported locations for this service. This method
382
+ # can be called in two ways: * **List all public locations:** Use the path `GET /
383
+ # v1/locations`. * **List project-visible locations:** Use the path `GET /v1/
384
+ # projects/`project_id`/locations`. This may include public locations as well as
385
+ # private or other locations specifically visible to the project.
382
386
  # @param [String] name
383
387
  # The resource that owns the locations collection, if applicable.
384
388
  # @param [Array<String>, String] extra_location_types
385
- # Optional. A list of extra location types that should be used as conditions for
386
- # controlling the visibility of the locations.
389
+ # Optional. Do not use this field. It is unsupported and is ignored unless
390
+ # explicitly documented otherwise. This is primarily for internal usage.
387
391
  # @param [String] filter
388
392
  # A filter to narrow down results to a preferred subset. The filtering language
389
393
  # accepts strings like `"displayName=tokyo"`, and is documented in more detail
@@ -425,6 +429,42 @@ module Google
425
429
  execute_or_queue_command(command, &block)
426
430
  end
427
431
 
432
+ # Refines the input translated text to improve the quality.
433
+ # @param [String] parent
434
+ # Required. Project or location to make a call. Must refer to a caller's project.
435
+ # Format: `projects/`project-number-or-id`/locations/`location-id``. For global
436
+ # calls, use `projects/`project-number-or-id`/locations/global` or `projects/`
437
+ # project-number-or-id``.
438
+ # @param [Google::Apis::TranslateV3beta1::RefineTextRequest] refine_text_request_object
439
+ # @param [String] fields
440
+ # Selector specifying which fields to include in a partial response.
441
+ # @param [String] quota_user
442
+ # Available to use for quota purposes for server-side applications. Can be any
443
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
444
+ # @param [Google::Apis::RequestOptions] options
445
+ # Request-specific options
446
+ #
447
+ # @yield [result, err] Result & error if block supplied
448
+ # @yieldparam result [Google::Apis::TranslateV3beta1::RefineTextResponse] parsed result object
449
+ # @yieldparam err [StandardError] error object if request failed
450
+ #
451
+ # @return [Google::Apis::TranslateV3beta1::RefineTextResponse]
452
+ #
453
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
454
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
455
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
456
+ def refine_location_text(parent, refine_text_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
457
+ command = make_simple_command(:post, 'v3beta1/{+parent}:refineText', options)
458
+ command.request_representation = Google::Apis::TranslateV3beta1::RefineTextRequest::Representation
459
+ command.request_object = refine_text_request_object
460
+ command.response_representation = Google::Apis::TranslateV3beta1::RefineTextResponse::Representation
461
+ command.response_class = Google::Apis::TranslateV3beta1::RefineTextResponse
462
+ command.params['parent'] = parent unless parent.nil?
463
+ command.query['fields'] = fields unless fields.nil?
464
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
465
+ execute_or_queue_command(command, &block)
466
+ end
467
+
428
468
  # Translates documents in synchronous mode.
429
469
  # @param [String] parent
430
470
  # Required. Location to make a regional call. Format: `projects/`project-number-
@@ -767,6 +807,14 @@ module Google
767
807
  # The standard list page size.
768
808
  # @param [String] page_token
769
809
  # The standard list page token.
810
+ # @param [Boolean] return_partial_success
811
+ # When set to `true`, operations that are reachable are returned as normal, and
812
+ # those that are unreachable are returned in the ListOperationsResponse.
813
+ # unreachable field. This can only be `true` when reading across collections.
814
+ # For example, when `parent` is set to `"projects/example/locations/-"`. This
815
+ # field is not supported by default and will result in an `UNIMPLEMENTED` error
816
+ # if set unless explicitly documented otherwise in service or product specific
817
+ # documentation.
770
818
  # @param [String] fields
771
819
  # Selector specifying which fields to include in a partial response.
772
820
  # @param [String] quota_user
@@ -784,7 +832,7 @@ module Google
784
832
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
785
833
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
786
834
  # @raise [Google::Apis::AuthorizationError] Authorization is required
787
- def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
835
+ def list_project_location_operations(name, filter: nil, page_size: nil, page_token: nil, return_partial_success: nil, fields: nil, quota_user: nil, options: nil, &block)
788
836
  command = make_simple_command(:get, 'v3beta1/{+name}/operations', options)
789
837
  command.response_representation = Google::Apis::TranslateV3beta1::ListOperationsResponse::Representation
790
838
  command.response_class = Google::Apis::TranslateV3beta1::ListOperationsResponse
@@ -792,6 +840,7 @@ module Google
792
840
  command.query['filter'] = filter unless filter.nil?
793
841
  command.query['pageSize'] = page_size unless page_size.nil?
794
842
  command.query['pageToken'] = page_token unless page_token.nil?
843
+ command.query['returnPartialSuccess'] = return_partial_success unless return_partial_success.nil?
795
844
  command.query['fields'] = fields unless fields.nil?
796
845
  command.query['quotaUser'] = quota_user unless quota_user.nil?
797
846
  execute_or_queue_command(command, &block)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-apis-translate_v3beta1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.35.0
4
+ version: 0.37.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
@@ -57,7 +57,7 @@ licenses:
57
57
  metadata:
58
58
  bug_tracker_uri: https://github.com/googleapis/google-api-ruby-client/issues
59
59
  changelog_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-translate_v3beta1/CHANGELOG.md
60
- documentation_uri: https://googleapis.dev/ruby/google-apis-translate_v3beta1/v0.35.0
60
+ documentation_uri: https://googleapis.dev/ruby/google-apis-translate_v3beta1/v0.37.0
61
61
  source_code_uri: https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-translate_v3beta1
62
62
  rdoc_options: []
63
63
  require_paths:
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  requirements: []
76
- rubygems_version: 3.6.8
76
+ rubygems_version: 3.6.9
77
77
  specification_version: 4
78
78
  summary: Simple REST client for Cloud Translation API V3beta1
79
79
  test_files: []