google-apis-translate_v3 0.37.0 → 0.39.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: a48cbab7a349a46af14df89cd6193faec68d5b51cbb03a3d5d39a0d892f151aa
4
- data.tar.gz: 9ee2e2a725e9558c50d30cda2eb273d950cc9e66483d0859b2b3fae36d435d6d
3
+ metadata.gz: 5dde1cb5b43cfd70a57f6bf1e756554497aca3801cefb46b9b4e79da6b125cec
4
+ data.tar.gz: bfd500279dbde192882e441fdf1c76ecaa496fff1f8e386469bf7990f693d5d0
5
5
  SHA512:
6
- metadata.gz: 1ef8708e43f2c1393f613976d8784403488adb34b17ccd8be3c0a6a522dd667a4cc0fe48fd75c2fdd966fa5aa6dc6a155d27e9f605dfde0f1cec0176510e85d2
7
- data.tar.gz: 56d662ee65915f988bb04e942f84896e5024faa9666bff968362b989c498e066945a2187ce090ffef08e4f0d82d6ef7053f19e0b2129fbb3d464889a7f9e4d19
6
+ metadata.gz: f4e7d59a3df5c85bcc84feebad9b38309113b4c3d60bf3c7b1296d413b446d5262932a84523ea5af87ef613e76556bb20988478c54ab647b6492682bf3a456c4
7
+ data.tar.gz: 3e9f42ad405e82fba8c8b5dd7100e5e7fff7ac43b849814ba327f5403ee99cc1fff2164e4e35f7477bed42740278567eb81b59f53e1a789c7a909d1e6afd403c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Release history for google-apis-translate_v3
2
2
 
3
+ ### v0.39.0 (2024-08-25)
4
+
5
+ * Regenerated from discovery document revision 20240821
6
+ * Regenerated using generator version 0.15.1
7
+
8
+ ### v0.38.0 (2024-07-25)
9
+
10
+ * Regenerated from discovery document revision 20240718
11
+
3
12
  ### v0.37.0 (2024-05-19)
4
13
 
5
14
  * Regenerated using generator version 0.15.0
@@ -174,8 +174,7 @@ module Google
174
174
  class AdaptiveMtTranslateRequest
175
175
  include Google::Apis::Core::Hashable
176
176
 
177
- # Required. The content of the input in string format. For now only one sentence
178
- # per request is supported.
177
+ # Required. The content of the input in string format.
179
178
  # Corresponds to the JSON property `content`
180
179
  # @return [Array<String>]
181
180
  attr_accessor :content
@@ -186,6 +185,17 @@ module Google
186
185
  # @return [String]
187
186
  attr_accessor :dataset
188
187
 
188
+ # Configures which glossary is used for a specific target language and defines
189
+ # options for applying that glossary.
190
+ # Corresponds to the JSON property `glossaryConfig`
191
+ # @return [Google::Apis::TranslateV3::GlossaryConfig]
192
+ attr_accessor :glossary_config
193
+
194
+ # Message of caller-provided reference configuration.
195
+ # Corresponds to the JSON property `referenceSentenceConfig`
196
+ # @return [Google::Apis::TranslateV3::ReferenceSentenceConfig]
197
+ attr_accessor :reference_sentence_config
198
+
189
199
  def initialize(**args)
190
200
  update!(**args)
191
201
  end
@@ -194,6 +204,8 @@ module Google
194
204
  def update!(**args)
195
205
  @content = args[:content] if args.key?(:content)
196
206
  @dataset = args[:dataset] if args.key?(:dataset)
207
+ @glossary_config = args[:glossary_config] if args.key?(:glossary_config)
208
+ @reference_sentence_config = args[:reference_sentence_config] if args.key?(:reference_sentence_config)
197
209
  end
198
210
  end
199
211
 
@@ -201,6 +213,12 @@ module Google
201
213
  class AdaptiveMtTranslateResponse
202
214
  include Google::Apis::Core::Hashable
203
215
 
216
+ # Text translation response if a glossary is provided in the request. This could
217
+ # be the same as 'translation' above if no terms apply.
218
+ # Corresponds to the JSON property `glossaryTranslations`
219
+ # @return [Array<Google::Apis::TranslateV3::AdaptiveMtTranslation>]
220
+ attr_accessor :glossary_translations
221
+
204
222
  # Output only. The translation's language code.
205
223
  # Corresponds to the JSON property `languageCode`
206
224
  # @return [String]
@@ -217,6 +235,7 @@ module Google
217
235
 
218
236
  # Update properties of this object
219
237
  def update!(**args)
238
+ @glossary_translations = args[:glossary_translations] if args.key?(:glossary_translations)
220
239
  @language_code = args[:language_code] if args.key?(:language_code)
221
240
  @translations = args[:translations] if args.key?(:translations)
222
241
  end
@@ -793,7 +812,7 @@ module Google
793
812
 
794
813
  # Output only. The resource name of the example, in form of `projects/`project-
795
814
  # number-or-id`/locations/`location_id`/datasets/`dataset_id`/examples/`
796
- # example_id`'
815
+ # example_id``
797
816
  # Corresponds to the JSON property `name`
798
817
  # @return [String]
799
818
  attr_accessor :name
@@ -1022,6 +1041,36 @@ module Google
1022
1041
  end
1023
1042
  end
1024
1043
 
1044
+ # Configures which glossary is used for a specific target language and defines
1045
+ # options for applying that glossary.
1046
+ class GlossaryConfig
1047
+ include Google::Apis::Core::Hashable
1048
+
1049
+ # Required. The `glossary` to be applied for this translation. The format
1050
+ # depends on the glossary: - User-provided custom glossary: `projects/`project-
1051
+ # number-or-id`/locations/`location-id`/glossaries/`glossary-id``
1052
+ # Corresponds to the JSON property `glossary`
1053
+ # @return [String]
1054
+ attr_accessor :glossary
1055
+
1056
+ # Optional. Indicates match is case insensitive. The default value is `false` if
1057
+ # missing.
1058
+ # Corresponds to the JSON property `ignoreCase`
1059
+ # @return [Boolean]
1060
+ attr_accessor :ignore_case
1061
+ alias_method :ignore_case?, :ignore_case
1062
+
1063
+ def initialize(**args)
1064
+ update!(**args)
1065
+ end
1066
+
1067
+ # Update properties of this object
1068
+ def update!(**args)
1069
+ @glossary = args[:glossary] if args.key?(:glossary)
1070
+ @ignore_case = args[:ignore_case] if args.key?(:ignore_case)
1071
+ end
1072
+ end
1073
+
1025
1074
  # Represents a single entry in a glossary.
1026
1075
  class GlossaryEntry
1027
1076
  include Google::Apis::Core::Hashable
@@ -1031,8 +1080,8 @@ module Google
1031
1080
  # @return [String]
1032
1081
  attr_accessor :description
1033
1082
 
1034
- # Required. The resource name of the entry. Format: "projects/*/locations/*/
1035
- # glossaries/*/glossaryEntries/*"
1083
+ # Identifier. The resource name of the entry. Format: `projects/*/locations/*/
1084
+ # glossaries/*/glossaryEntries/*`
1036
1085
  # Corresponds to the JSON property `name`
1037
1086
  # @return [String]
1038
1087
  attr_accessor :name
@@ -1782,6 +1831,83 @@ module Google
1782
1831
  end
1783
1832
  end
1784
1833
 
1834
+ # Message of caller-provided reference configuration.
1835
+ class ReferenceSentenceConfig
1836
+ include Google::Apis::Core::Hashable
1837
+
1838
+ # Reference sentences pair lists. Each list will be used as the references to
1839
+ # translate the sentence under "content" field at the corresponding index.
1840
+ # Length of the list is required to be equal to the length of "content" field.
1841
+ # Corresponds to the JSON property `referenceSentencePairLists`
1842
+ # @return [Array<Google::Apis::TranslateV3::ReferenceSentencePairList>]
1843
+ attr_accessor :reference_sentence_pair_lists
1844
+
1845
+ # Source language code.
1846
+ # Corresponds to the JSON property `sourceLanguageCode`
1847
+ # @return [String]
1848
+ attr_accessor :source_language_code
1849
+
1850
+ # Target language code.
1851
+ # Corresponds to the JSON property `targetLanguageCode`
1852
+ # @return [String]
1853
+ attr_accessor :target_language_code
1854
+
1855
+ def initialize(**args)
1856
+ update!(**args)
1857
+ end
1858
+
1859
+ # Update properties of this object
1860
+ def update!(**args)
1861
+ @reference_sentence_pair_lists = args[:reference_sentence_pair_lists] if args.key?(:reference_sentence_pair_lists)
1862
+ @source_language_code = args[:source_language_code] if args.key?(:source_language_code)
1863
+ @target_language_code = args[:target_language_code] if args.key?(:target_language_code)
1864
+ end
1865
+ end
1866
+
1867
+ # A pair of sentences used as reference in source and target languages.
1868
+ class ReferenceSentencePair
1869
+ include Google::Apis::Core::Hashable
1870
+
1871
+ # Source sentence in the sentence pair.
1872
+ # Corresponds to the JSON property `sourceSentence`
1873
+ # @return [String]
1874
+ attr_accessor :source_sentence
1875
+
1876
+ # Target sentence in the sentence pair.
1877
+ # Corresponds to the JSON property `targetSentence`
1878
+ # @return [String]
1879
+ attr_accessor :target_sentence
1880
+
1881
+ def initialize(**args)
1882
+ update!(**args)
1883
+ end
1884
+
1885
+ # Update properties of this object
1886
+ def update!(**args)
1887
+ @source_sentence = args[:source_sentence] if args.key?(:source_sentence)
1888
+ @target_sentence = args[:target_sentence] if args.key?(:target_sentence)
1889
+ end
1890
+ end
1891
+
1892
+ # A list of reference sentence pairs.
1893
+ class ReferenceSentencePairList
1894
+ include Google::Apis::Core::Hashable
1895
+
1896
+ # Reference sentence pairs.
1897
+ # Corresponds to the JSON property `referenceSentencePairs`
1898
+ # @return [Array<Google::Apis::TranslateV3::ReferenceSentencePair>]
1899
+ attr_accessor :reference_sentence_pairs
1900
+
1901
+ def initialize(**args)
1902
+ update!(**args)
1903
+ end
1904
+
1905
+ # Update properties of this object
1906
+ def update!(**args)
1907
+ @reference_sentence_pairs = args[:reference_sentence_pairs] if args.key?(:reference_sentence_pairs)
1908
+ end
1909
+ end
1910
+
1785
1911
  # A single romanization response.
1786
1912
  class Romanization
1787
1913
  include Google::Apis::Core::Hashable
@@ -2173,10 +2299,12 @@ module Google
2173
2299
  # Optional. The `model` type requested for this translation. The format depends
2174
2300
  # on model type: - AutoML Translation models: `projects/`project-number-or-id`/
2175
2301
  # locations/`location-id`/models/`model-id`` - General (built-in) models: `
2176
- # projects/`project-number-or-id`/locations/`location-id`/models/general/nmt`,
2177
- # For global (non-regionalized) requests, use `location-id` `global`. For
2178
- # example, `projects/`project-number-or-id`/locations/global/models/general/nmt`.
2179
- # If not provided, the default Google model (NMT) will be used
2302
+ # projects/`project-number-or-id`/locations/`location-id`/models/general/nmt`, -
2303
+ # Translation LLM models: `projects/`project-number-or-id`/locations/`location-
2304
+ # id`/models/general/translation-llm`, For global (non-regionalized) requests,
2305
+ # use `location-id` `global`. For example, `projects/`project-number-or-id`/
2306
+ # locations/global/models/general/nmt`. If not provided, the default Google
2307
+ # model (NMT) will be used
2180
2308
  # Corresponds to the JSON property `model`
2181
2309
  # @return [String]
2182
2310
  attr_accessor :model
@@ -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.37.0"
19
+ GEM_VERSION = "0.39.0"
20
20
 
21
21
  # Version of the code generator used to generate this client
22
- GENERATOR_VERSION = "0.15.0"
22
+ GENERATOR_VERSION = "0.15.1"
23
23
 
24
24
  # Revision of the discovery document this client was generated from
25
- REVISION = "20240126"
25
+ REVISION = "20240821"
26
26
  end
27
27
  end
28
28
  end
@@ -196,6 +196,12 @@ module Google
196
196
  include Google::Apis::Core::JsonObjectSupport
197
197
  end
198
198
 
199
+ class GlossaryConfig
200
+ class Representation < Google::Apis::Core::JsonRepresentation; end
201
+
202
+ include Google::Apis::Core::JsonObjectSupport
203
+ end
204
+
199
205
  class GlossaryEntry
200
206
  class Representation < Google::Apis::Core::JsonRepresentation; end
201
207
 
@@ -352,6 +358,24 @@ module Google
352
358
  include Google::Apis::Core::JsonObjectSupport
353
359
  end
354
360
 
361
+ class ReferenceSentenceConfig
362
+ class Representation < Google::Apis::Core::JsonRepresentation; end
363
+
364
+ include Google::Apis::Core::JsonObjectSupport
365
+ end
366
+
367
+ class ReferenceSentencePair
368
+ class Representation < Google::Apis::Core::JsonRepresentation; end
369
+
370
+ include Google::Apis::Core::JsonObjectSupport
371
+ end
372
+
373
+ class ReferenceSentencePairList
374
+ class Representation < Google::Apis::Core::JsonRepresentation; end
375
+
376
+ include Google::Apis::Core::JsonObjectSupport
377
+ end
378
+
355
379
  class Romanization
356
380
  class Representation < Google::Apis::Core::JsonRepresentation; end
357
381
 
@@ -476,12 +500,18 @@ module Google
476
500
  class Representation < Google::Apis::Core::JsonRepresentation
477
501
  collection :content, as: 'content'
478
502
  property :dataset, as: 'dataset'
503
+ property :glossary_config, as: 'glossaryConfig', class: Google::Apis::TranslateV3::GlossaryConfig, decorator: Google::Apis::TranslateV3::GlossaryConfig::Representation
504
+
505
+ property :reference_sentence_config, as: 'referenceSentenceConfig', class: Google::Apis::TranslateV3::ReferenceSentenceConfig, decorator: Google::Apis::TranslateV3::ReferenceSentenceConfig::Representation
506
+
479
507
  end
480
508
  end
481
509
 
482
510
  class AdaptiveMtTranslateResponse
483
511
  # @private
484
512
  class Representation < Google::Apis::Core::JsonRepresentation
513
+ collection :glossary_translations, as: 'glossaryTranslations', class: Google::Apis::TranslateV3::AdaptiveMtTranslation, decorator: Google::Apis::TranslateV3::AdaptiveMtTranslation::Representation
514
+
485
515
  property :language_code, as: 'languageCode'
486
516
  collection :translations, as: 'translations', class: Google::Apis::TranslateV3::AdaptiveMtTranslation, decorator: Google::Apis::TranslateV3::AdaptiveMtTranslation::Representation
487
517
 
@@ -716,6 +746,14 @@ module Google
716
746
  end
717
747
  end
718
748
 
749
+ class GlossaryConfig
750
+ # @private
751
+ class Representation < Google::Apis::Core::JsonRepresentation
752
+ property :glossary, as: 'glossary'
753
+ property :ignore_case, as: 'ignoreCase'
754
+ end
755
+ end
756
+
719
757
  class GlossaryEntry
720
758
  # @private
721
759
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -958,6 +996,32 @@ module Google
958
996
  end
959
997
  end
960
998
 
999
+ class ReferenceSentenceConfig
1000
+ # @private
1001
+ class Representation < Google::Apis::Core::JsonRepresentation
1002
+ collection :reference_sentence_pair_lists, as: 'referenceSentencePairLists', class: Google::Apis::TranslateV3::ReferenceSentencePairList, decorator: Google::Apis::TranslateV3::ReferenceSentencePairList::Representation
1003
+
1004
+ property :source_language_code, as: 'sourceLanguageCode'
1005
+ property :target_language_code, as: 'targetLanguageCode'
1006
+ end
1007
+ end
1008
+
1009
+ class ReferenceSentencePair
1010
+ # @private
1011
+ class Representation < Google::Apis::Core::JsonRepresentation
1012
+ property :source_sentence, as: 'sourceSentence'
1013
+ property :target_sentence, as: 'targetSentence'
1014
+ end
1015
+ end
1016
+
1017
+ class ReferenceSentencePairList
1018
+ # @private
1019
+ class Representation < Google::Apis::Core::JsonRepresentation
1020
+ collection :reference_sentence_pairs, as: 'referenceSentencePairs', class: Google::Apis::TranslateV3::ReferenceSentencePair, decorator: Google::Apis::TranslateV3::ReferenceSentencePair::Representation
1021
+
1022
+ end
1023
+ end
1024
+
961
1025
  class Romanization
962
1026
  # @private
963
1027
  class Representation < Google::Apis::Core::JsonRepresentation
@@ -1540,8 +1540,8 @@ module Google
1540
1540
 
1541
1541
  # Updates a glossary entry.
1542
1542
  # @param [String] name
1543
- # Required. The resource name of the entry. Format: "projects/*/locations/*/
1544
- # glossaries/*/glossaryEntries/*"
1543
+ # Identifier. The resource name of the entry. Format: `projects/*/locations/*/
1544
+ # glossaries/*/glossaryEntries/*`
1545
1545
  # @param [Google::Apis::TranslateV3::GlossaryEntry] glossary_entry_object
1546
1546
  # @param [String] fields
1547
1547
  # Selector specifying which fields to include in a partial response.
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.37.0
4
+ version: 0.39.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-05-26 00:00:00.000000000 Z
11
+ date: 2024-08-25 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.37.0
61
+ documentation_uri: https://googleapis.dev/ruby/google-apis-translate_v3/v0.39.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: []