google-cloud-translate 1.4.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/AUTHENTICATION.md +6 -2
- data/CHANGELOG.md +33 -0
- data/CONTRIBUTING.md +1 -1
- data/LICENSE +1 -1
- data/OVERVIEW.md +223 -18
- data/lib/google-cloud-translate.rb +79 -91
- data/lib/google/cloud/translate.rb +127 -114
- data/lib/google/cloud/translate/v2.rb +169 -0
- data/lib/google/cloud/translate/v2/api.rb +255 -0
- data/lib/google/cloud/translate/v2/credentials.rb +58 -0
- data/lib/google/cloud/translate/v2/detection.rb +132 -0
- data/lib/google/cloud/translate/v2/language.rb +68 -0
- data/lib/google/cloud/translate/v2/service.rb +205 -0
- data/lib/google/cloud/translate/v2/translation.rb +120 -0
- data/lib/google/cloud/translate/v3.rb +144 -0
- data/lib/google/cloud/translate/v3/credentials.rb +42 -0
- data/lib/google/cloud/translate/v3/doc/google/cloud/translate/v3/translation_service.rb +663 -0
- data/lib/google/cloud/translate/v3/doc/google/longrunning/operations.rb +51 -0
- data/lib/google/cloud/translate/v3/doc/google/protobuf/any.rb +131 -0
- data/lib/google/cloud/translate/v3/doc/google/protobuf/timestamp.rb +113 -0
- data/lib/google/cloud/translate/v3/doc/google/rpc/status.rb +87 -0
- data/lib/google/cloud/translate/v3/translation_service_client.rb +927 -0
- data/lib/google/cloud/translate/v3/translation_service_client_config.json +66 -0
- data/lib/google/cloud/translate/v3/translation_service_pb.rb +226 -0
- data/lib/google/cloud/translate/v3/translation_service_services_pb.rb +68 -0
- data/lib/google/cloud/translate/version.rb +1 -1
- metadata +47 -37
- data/lib/google/cloud/translate/api.rb +0 -274
- data/lib/google/cloud/translate/credentials.rb +0 -57
- data/lib/google/cloud/translate/detection.rb +0 -139
- data/lib/google/cloud/translate/language.rb +0 -70
- data/lib/google/cloud/translate/service.rb +0 -206
- data/lib/google/cloud/translate/translation.rb +0 -125
@@ -0,0 +1,66 @@
|
|
1
|
+
{
|
2
|
+
"interfaces": {
|
3
|
+
"google.cloud.translation.v3.TranslationService": {
|
4
|
+
"retry_codes": {
|
5
|
+
"idempotent": [
|
6
|
+
"DEADLINE_EXCEEDED",
|
7
|
+
"UNAVAILABLE"
|
8
|
+
],
|
9
|
+
"non_idempotent": []
|
10
|
+
},
|
11
|
+
"retry_params": {
|
12
|
+
"default": {
|
13
|
+
"initial_retry_delay_millis": 100,
|
14
|
+
"retry_delay_multiplier": 1.3,
|
15
|
+
"max_retry_delay_millis": 60000,
|
16
|
+
"initial_rpc_timeout_millis": 20000,
|
17
|
+
"rpc_timeout_multiplier": 1.0,
|
18
|
+
"max_rpc_timeout_millis": 20000,
|
19
|
+
"total_timeout_millis": 600000
|
20
|
+
}
|
21
|
+
},
|
22
|
+
"methods": {
|
23
|
+
"TranslateText": {
|
24
|
+
"timeout_millis": 60000,
|
25
|
+
"retry_codes_name": "non_idempotent",
|
26
|
+
"retry_params_name": "default"
|
27
|
+
},
|
28
|
+
"DetectLanguage": {
|
29
|
+
"timeout_millis": 60000,
|
30
|
+
"retry_codes_name": "non_idempotent",
|
31
|
+
"retry_params_name": "default"
|
32
|
+
},
|
33
|
+
"GetSupportedLanguages": {
|
34
|
+
"timeout_millis": 60000,
|
35
|
+
"retry_codes_name": "idempotent",
|
36
|
+
"retry_params_name": "default"
|
37
|
+
},
|
38
|
+
"BatchTranslateText": {
|
39
|
+
"timeout_millis": 60000,
|
40
|
+
"retry_codes_name": "non_idempotent",
|
41
|
+
"retry_params_name": "default"
|
42
|
+
},
|
43
|
+
"CreateGlossary": {
|
44
|
+
"timeout_millis": 60000,
|
45
|
+
"retry_codes_name": "non_idempotent",
|
46
|
+
"retry_params_name": "default"
|
47
|
+
},
|
48
|
+
"ListGlossaries": {
|
49
|
+
"timeout_millis": 60000,
|
50
|
+
"retry_codes_name": "idempotent",
|
51
|
+
"retry_params_name": "default"
|
52
|
+
},
|
53
|
+
"GetGlossary": {
|
54
|
+
"timeout_millis": 60000,
|
55
|
+
"retry_codes_name": "idempotent",
|
56
|
+
"retry_params_name": "default"
|
57
|
+
},
|
58
|
+
"DeleteGlossary": {
|
59
|
+
"timeout_millis": 60000,
|
60
|
+
"retry_codes_name": "non_idempotent",
|
61
|
+
"retry_params_name": "default"
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
66
|
+
}
|
@@ -0,0 +1,226 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# source: google/cloud/translate/v3/translation_service.proto
|
3
|
+
|
4
|
+
|
5
|
+
require 'google/protobuf'
|
6
|
+
|
7
|
+
require 'google/api/annotations_pb'
|
8
|
+
require 'google/api/client_pb'
|
9
|
+
require 'google/api/field_behavior_pb'
|
10
|
+
require 'google/api/resource_pb'
|
11
|
+
require 'google/longrunning/operations_pb'
|
12
|
+
require 'google/protobuf/timestamp_pb'
|
13
|
+
Google::Protobuf::DescriptorPool.generated_pool.build do
|
14
|
+
add_message "google.cloud.translation.v3.TranslateTextGlossaryConfig" do
|
15
|
+
optional :glossary, :string, 1
|
16
|
+
optional :ignore_case, :bool, 2
|
17
|
+
end
|
18
|
+
add_message "google.cloud.translation.v3.TranslateTextRequest" do
|
19
|
+
repeated :contents, :string, 1
|
20
|
+
optional :mime_type, :string, 3
|
21
|
+
optional :source_language_code, :string, 4
|
22
|
+
optional :target_language_code, :string, 5
|
23
|
+
optional :parent, :string, 8
|
24
|
+
optional :model, :string, 6
|
25
|
+
optional :glossary_config, :message, 7, "google.cloud.translation.v3.TranslateTextGlossaryConfig"
|
26
|
+
map :labels, :string, :string, 10
|
27
|
+
end
|
28
|
+
add_message "google.cloud.translation.v3.TranslateTextResponse" do
|
29
|
+
repeated :translations, :message, 1, "google.cloud.translation.v3.Translation"
|
30
|
+
repeated :glossary_translations, :message, 3, "google.cloud.translation.v3.Translation"
|
31
|
+
end
|
32
|
+
add_message "google.cloud.translation.v3.Translation" do
|
33
|
+
optional :translated_text, :string, 1
|
34
|
+
optional :model, :string, 2
|
35
|
+
optional :detected_language_code, :string, 4
|
36
|
+
optional :glossary_config, :message, 3, "google.cloud.translation.v3.TranslateTextGlossaryConfig"
|
37
|
+
end
|
38
|
+
add_message "google.cloud.translation.v3.DetectLanguageRequest" do
|
39
|
+
optional :parent, :string, 5
|
40
|
+
optional :model, :string, 4
|
41
|
+
optional :mime_type, :string, 3
|
42
|
+
map :labels, :string, :string, 6
|
43
|
+
oneof :source do
|
44
|
+
optional :content, :string, 1
|
45
|
+
end
|
46
|
+
end
|
47
|
+
add_message "google.cloud.translation.v3.DetectedLanguage" do
|
48
|
+
optional :language_code, :string, 1
|
49
|
+
optional :confidence, :float, 2
|
50
|
+
end
|
51
|
+
add_message "google.cloud.translation.v3.DetectLanguageResponse" do
|
52
|
+
repeated :languages, :message, 1, "google.cloud.translation.v3.DetectedLanguage"
|
53
|
+
end
|
54
|
+
add_message "google.cloud.translation.v3.GetSupportedLanguagesRequest" do
|
55
|
+
optional :parent, :string, 3
|
56
|
+
optional :display_language_code, :string, 1
|
57
|
+
optional :model, :string, 2
|
58
|
+
end
|
59
|
+
add_message "google.cloud.translation.v3.SupportedLanguages" do
|
60
|
+
repeated :languages, :message, 1, "google.cloud.translation.v3.SupportedLanguage"
|
61
|
+
end
|
62
|
+
add_message "google.cloud.translation.v3.SupportedLanguage" do
|
63
|
+
optional :language_code, :string, 1
|
64
|
+
optional :display_name, :string, 2
|
65
|
+
optional :support_source, :bool, 3
|
66
|
+
optional :support_target, :bool, 4
|
67
|
+
end
|
68
|
+
add_message "google.cloud.translation.v3.GcsSource" do
|
69
|
+
optional :input_uri, :string, 1
|
70
|
+
end
|
71
|
+
add_message "google.cloud.translation.v3.InputConfig" do
|
72
|
+
optional :mime_type, :string, 1
|
73
|
+
oneof :source do
|
74
|
+
optional :gcs_source, :message, 2, "google.cloud.translation.v3.GcsSource"
|
75
|
+
end
|
76
|
+
end
|
77
|
+
add_message "google.cloud.translation.v3.GcsDestination" do
|
78
|
+
optional :output_uri_prefix, :string, 1
|
79
|
+
end
|
80
|
+
add_message "google.cloud.translation.v3.OutputConfig" do
|
81
|
+
oneof :destination do
|
82
|
+
optional :gcs_destination, :message, 1, "google.cloud.translation.v3.GcsDestination"
|
83
|
+
end
|
84
|
+
end
|
85
|
+
add_message "google.cloud.translation.v3.BatchTranslateTextRequest" do
|
86
|
+
optional :parent, :string, 1
|
87
|
+
optional :source_language_code, :string, 2
|
88
|
+
repeated :target_language_codes, :string, 3
|
89
|
+
map :models, :string, :string, 4
|
90
|
+
repeated :input_configs, :message, 5, "google.cloud.translation.v3.InputConfig"
|
91
|
+
optional :output_config, :message, 6, "google.cloud.translation.v3.OutputConfig"
|
92
|
+
map :glossaries, :string, :message, 7, "google.cloud.translation.v3.TranslateTextGlossaryConfig"
|
93
|
+
map :labels, :string, :string, 9
|
94
|
+
end
|
95
|
+
add_message "google.cloud.translation.v3.BatchTranslateMetadata" do
|
96
|
+
optional :state, :enum, 1, "google.cloud.translation.v3.BatchTranslateMetadata.State"
|
97
|
+
optional :translated_characters, :int64, 2
|
98
|
+
optional :failed_characters, :int64, 3
|
99
|
+
optional :total_characters, :int64, 4
|
100
|
+
optional :submit_time, :message, 5, "google.protobuf.Timestamp"
|
101
|
+
end
|
102
|
+
add_enum "google.cloud.translation.v3.BatchTranslateMetadata.State" do
|
103
|
+
value :STATE_UNSPECIFIED, 0
|
104
|
+
value :RUNNING, 1
|
105
|
+
value :SUCCEEDED, 2
|
106
|
+
value :FAILED, 3
|
107
|
+
value :CANCELLING, 4
|
108
|
+
value :CANCELLED, 5
|
109
|
+
end
|
110
|
+
add_message "google.cloud.translation.v3.BatchTranslateResponse" do
|
111
|
+
optional :total_characters, :int64, 1
|
112
|
+
optional :translated_characters, :int64, 2
|
113
|
+
optional :failed_characters, :int64, 3
|
114
|
+
optional :submit_time, :message, 4, "google.protobuf.Timestamp"
|
115
|
+
optional :end_time, :message, 5, "google.protobuf.Timestamp"
|
116
|
+
end
|
117
|
+
add_message "google.cloud.translation.v3.GlossaryInputConfig" do
|
118
|
+
oneof :source do
|
119
|
+
optional :gcs_source, :message, 1, "google.cloud.translation.v3.GcsSource"
|
120
|
+
end
|
121
|
+
end
|
122
|
+
add_message "google.cloud.translation.v3.Glossary" do
|
123
|
+
optional :name, :string, 1
|
124
|
+
optional :input_config, :message, 5, "google.cloud.translation.v3.GlossaryInputConfig"
|
125
|
+
optional :entry_count, :int32, 6
|
126
|
+
optional :submit_time, :message, 7, "google.protobuf.Timestamp"
|
127
|
+
optional :end_time, :message, 8, "google.protobuf.Timestamp"
|
128
|
+
oneof :languages do
|
129
|
+
optional :language_pair, :message, 3, "google.cloud.translation.v3.Glossary.LanguageCodePair"
|
130
|
+
optional :language_codes_set, :message, 4, "google.cloud.translation.v3.Glossary.LanguageCodesSet"
|
131
|
+
end
|
132
|
+
end
|
133
|
+
add_message "google.cloud.translation.v3.Glossary.LanguageCodePair" do
|
134
|
+
optional :source_language_code, :string, 1
|
135
|
+
optional :target_language_code, :string, 2
|
136
|
+
end
|
137
|
+
add_message "google.cloud.translation.v3.Glossary.LanguageCodesSet" do
|
138
|
+
repeated :language_codes, :string, 1
|
139
|
+
end
|
140
|
+
add_message "google.cloud.translation.v3.CreateGlossaryRequest" do
|
141
|
+
optional :parent, :string, 1
|
142
|
+
optional :glossary, :message, 2, "google.cloud.translation.v3.Glossary"
|
143
|
+
end
|
144
|
+
add_message "google.cloud.translation.v3.GetGlossaryRequest" do
|
145
|
+
optional :name, :string, 1
|
146
|
+
end
|
147
|
+
add_message "google.cloud.translation.v3.DeleteGlossaryRequest" do
|
148
|
+
optional :name, :string, 1
|
149
|
+
end
|
150
|
+
add_message "google.cloud.translation.v3.ListGlossariesRequest" do
|
151
|
+
optional :parent, :string, 1
|
152
|
+
optional :page_size, :int32, 2
|
153
|
+
optional :page_token, :string, 3
|
154
|
+
optional :filter, :string, 4
|
155
|
+
end
|
156
|
+
add_message "google.cloud.translation.v3.ListGlossariesResponse" do
|
157
|
+
repeated :glossaries, :message, 1, "google.cloud.translation.v3.Glossary"
|
158
|
+
optional :next_page_token, :string, 2
|
159
|
+
end
|
160
|
+
add_message "google.cloud.translation.v3.CreateGlossaryMetadata" do
|
161
|
+
optional :name, :string, 1
|
162
|
+
optional :state, :enum, 2, "google.cloud.translation.v3.CreateGlossaryMetadata.State"
|
163
|
+
optional :submit_time, :message, 3, "google.protobuf.Timestamp"
|
164
|
+
end
|
165
|
+
add_enum "google.cloud.translation.v3.CreateGlossaryMetadata.State" do
|
166
|
+
value :STATE_UNSPECIFIED, 0
|
167
|
+
value :RUNNING, 1
|
168
|
+
value :SUCCEEDED, 2
|
169
|
+
value :FAILED, 3
|
170
|
+
value :CANCELLING, 4
|
171
|
+
value :CANCELLED, 5
|
172
|
+
end
|
173
|
+
add_message "google.cloud.translation.v3.DeleteGlossaryMetadata" do
|
174
|
+
optional :name, :string, 1
|
175
|
+
optional :state, :enum, 2, "google.cloud.translation.v3.DeleteGlossaryMetadata.State"
|
176
|
+
optional :submit_time, :message, 3, "google.protobuf.Timestamp"
|
177
|
+
end
|
178
|
+
add_enum "google.cloud.translation.v3.DeleteGlossaryMetadata.State" do
|
179
|
+
value :STATE_UNSPECIFIED, 0
|
180
|
+
value :RUNNING, 1
|
181
|
+
value :SUCCEEDED, 2
|
182
|
+
value :FAILED, 3
|
183
|
+
value :CANCELLING, 4
|
184
|
+
value :CANCELLED, 5
|
185
|
+
end
|
186
|
+
add_message "google.cloud.translation.v3.DeleteGlossaryResponse" do
|
187
|
+
optional :name, :string, 1
|
188
|
+
optional :submit_time, :message, 2, "google.protobuf.Timestamp"
|
189
|
+
optional :end_time, :message, 3, "google.protobuf.Timestamp"
|
190
|
+
end
|
191
|
+
end
|
192
|
+
|
193
|
+
module Google::Cloud::Translate::V3
|
194
|
+
TranslateTextGlossaryConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TranslateTextGlossaryConfig").msgclass
|
195
|
+
TranslateTextRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TranslateTextRequest").msgclass
|
196
|
+
TranslateTextResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.TranslateTextResponse").msgclass
|
197
|
+
Translation = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Translation").msgclass
|
198
|
+
DetectLanguageRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DetectLanguageRequest").msgclass
|
199
|
+
DetectedLanguage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DetectedLanguage").msgclass
|
200
|
+
DetectLanguageResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DetectLanguageResponse").msgclass
|
201
|
+
GetSupportedLanguagesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetSupportedLanguagesRequest").msgclass
|
202
|
+
SupportedLanguages = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.SupportedLanguages").msgclass
|
203
|
+
SupportedLanguage = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.SupportedLanguage").msgclass
|
204
|
+
GcsSource = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GcsSource").msgclass
|
205
|
+
InputConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.InputConfig").msgclass
|
206
|
+
GcsDestination = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GcsDestination").msgclass
|
207
|
+
OutputConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.OutputConfig").msgclass
|
208
|
+
BatchTranslateTextRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateTextRequest").msgclass
|
209
|
+
BatchTranslateMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateMetadata").msgclass
|
210
|
+
BatchTranslateMetadata::State = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateMetadata.State").enummodule
|
211
|
+
BatchTranslateResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.BatchTranslateResponse").msgclass
|
212
|
+
GlossaryInputConfig = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GlossaryInputConfig").msgclass
|
213
|
+
Glossary = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Glossary").msgclass
|
214
|
+
Glossary::LanguageCodePair = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Glossary.LanguageCodePair").msgclass
|
215
|
+
Glossary::LanguageCodesSet = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.Glossary.LanguageCodesSet").msgclass
|
216
|
+
CreateGlossaryRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateGlossaryRequest").msgclass
|
217
|
+
GetGlossaryRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.GetGlossaryRequest").msgclass
|
218
|
+
DeleteGlossaryRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryRequest").msgclass
|
219
|
+
ListGlossariesRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListGlossariesRequest").msgclass
|
220
|
+
ListGlossariesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.ListGlossariesResponse").msgclass
|
221
|
+
CreateGlossaryMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateGlossaryMetadata").msgclass
|
222
|
+
CreateGlossaryMetadata::State = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.CreateGlossaryMetadata.State").enummodule
|
223
|
+
DeleteGlossaryMetadata = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryMetadata").msgclass
|
224
|
+
DeleteGlossaryMetadata::State = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryMetadata.State").enummodule
|
225
|
+
DeleteGlossaryResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.translation.v3.DeleteGlossaryResponse").msgclass
|
226
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
2
|
+
# Source: google/cloud/translate/v3/translation_service.proto for package 'Google::Cloud::Translate::V3'
|
3
|
+
# Original file comments:
|
4
|
+
# Copyright 2019 Google LLC.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
18
|
+
#
|
19
|
+
|
20
|
+
|
21
|
+
require 'grpc'
|
22
|
+
require 'google/cloud/translate/v3/translation_service_pb'
|
23
|
+
|
24
|
+
module Google::Cloud::Translate::V3
|
25
|
+
module TranslationService
|
26
|
+
# Proto file for the Cloud Translation API (v3 GA).
|
27
|
+
#
|
28
|
+
# Provides natural language translation operations.
|
29
|
+
class Service
|
30
|
+
|
31
|
+
include GRPC::GenericService
|
32
|
+
|
33
|
+
self.marshal_class_method = :encode
|
34
|
+
self.unmarshal_class_method = :decode
|
35
|
+
self.service_name = 'google.cloud.translation.v3.TranslationService'
|
36
|
+
|
37
|
+
# Translates input text and returns translated text.
|
38
|
+
rpc :TranslateText, TranslateTextRequest, TranslateTextResponse
|
39
|
+
# Detects the language of text within a request.
|
40
|
+
rpc :DetectLanguage, DetectLanguageRequest, DetectLanguageResponse
|
41
|
+
# Returns a list of supported languages for translation.
|
42
|
+
rpc :GetSupportedLanguages, GetSupportedLanguagesRequest, SupportedLanguages
|
43
|
+
# Translates a large volume of text in asynchronous batch mode.
|
44
|
+
# This function provides real-time output as the inputs are being processed.
|
45
|
+
# If caller cancels a request, the partial results (for an input file, it's
|
46
|
+
# all or nothing) may still be available on the specified output location.
|
47
|
+
#
|
48
|
+
# This call returns immediately and you can
|
49
|
+
# use google.longrunning.Operation.name to poll the status of the call.
|
50
|
+
rpc :BatchTranslateText, BatchTranslateTextRequest, Google::Longrunning::Operation
|
51
|
+
# Creates a glossary and returns the long-running operation. Returns
|
52
|
+
# NOT_FOUND, if the project doesn't exist.
|
53
|
+
rpc :CreateGlossary, CreateGlossaryRequest, Google::Longrunning::Operation
|
54
|
+
# Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't
|
55
|
+
# exist.
|
56
|
+
rpc :ListGlossaries, ListGlossariesRequest, ListGlossariesResponse
|
57
|
+
# Gets a glossary. Returns NOT_FOUND, if the glossary doesn't
|
58
|
+
# exist.
|
59
|
+
rpc :GetGlossary, GetGlossaryRequest, Glossary
|
60
|
+
# Deletes a glossary, or cancels glossary construction
|
61
|
+
# if the glossary isn't created yet.
|
62
|
+
# Returns NOT_FOUND, if the glossary doesn't exist.
|
63
|
+
rpc :DeleteGlossary, DeleteGlossaryRequest, Google::Longrunning::Operation
|
64
|
+
end
|
65
|
+
|
66
|
+
Stub = Service.rpc_stub_class
|
67
|
+
end
|
68
|
+
end
|
metadata
CHANGED
@@ -1,64 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-translate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
- Chris Smith
|
7
|
+
- Google LLC
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-28 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
14
|
+
name: faraday
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
16
|
requirements:
|
18
17
|
- - "~>"
|
19
18
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
19
|
+
version: '0.13'
|
21
20
|
type: :runtime
|
22
21
|
prerelease: false
|
23
22
|
version_requirements: !ruby/object:Gem::Requirement
|
24
23
|
requirements:
|
25
24
|
- - "~>"
|
26
25
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
26
|
+
version: '0.13'
|
28
27
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
28
|
+
name: google-cloud-core
|
30
29
|
requirement: !ruby/object:Gem::Requirement
|
31
30
|
requirements:
|
32
31
|
- - "~>"
|
33
32
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
33
|
+
version: '1.2'
|
35
34
|
type: :runtime
|
36
35
|
prerelease: false
|
37
36
|
version_requirements: !ruby/object:Gem::Requirement
|
38
37
|
requirements:
|
39
38
|
- - "~>"
|
40
39
|
- !ruby/object:Gem::Version
|
41
|
-
version: '
|
40
|
+
version: '1.2'
|
42
41
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
42
|
+
name: google-gax
|
44
43
|
requirement: !ruby/object:Gem::Requirement
|
45
44
|
requirements:
|
46
|
-
- - "
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: 0.6.2
|
49
|
-
- - "<"
|
45
|
+
- - "~>"
|
50
46
|
- !ruby/object:Gem::Version
|
51
|
-
version:
|
47
|
+
version: '1.7'
|
52
48
|
type: :runtime
|
53
49
|
prerelease: false
|
54
50
|
version_requirements: !ruby/object:Gem::Requirement
|
55
51
|
requirements:
|
56
|
-
- - "
|
57
|
-
- !ruby/object:Gem::Version
|
58
|
-
version: 0.6.2
|
59
|
-
- - "<"
|
52
|
+
- - "~>"
|
60
53
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
54
|
+
version: '1.7'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: autotest-suffix
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,14 +72,14 @@ dependencies:
|
|
79
72
|
requirements:
|
80
73
|
- - "~>"
|
81
74
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
75
|
+
version: 1.24.0
|
83
76
|
type: :development
|
84
77
|
prerelease: false
|
85
78
|
version_requirements: !ruby/object:Gem::Requirement
|
86
79
|
requirements:
|
87
80
|
- - "~>"
|
88
81
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
82
|
+
version: 1.24.0
|
90
83
|
- !ruby/object:Gem::Dependency
|
91
84
|
name: minitest
|
92
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -199,11 +192,9 @@ dependencies:
|
|
199
192
|
- - "~>"
|
200
193
|
- !ruby/object:Gem::Version
|
201
194
|
version: 0.1.13
|
202
|
-
description: google-cloud-translate is the official library for
|
195
|
+
description: google-cloud-translate is the official library for Cloud Translation
|
203
196
|
API.
|
204
|
-
email:
|
205
|
-
- mike@blowmage.com
|
206
|
-
- quartzmo@gmail.com
|
197
|
+
email: googleapis-packages@google.com
|
207
198
|
executables: []
|
208
199
|
extensions: []
|
209
200
|
extra_rdoc_files: []
|
@@ -218,18 +209,37 @@ files:
|
|
218
209
|
- TROUBLESHOOTING.md
|
219
210
|
- lib/google-cloud-translate.rb
|
220
211
|
- lib/google/cloud/translate.rb
|
221
|
-
- lib/google/cloud/translate/
|
222
|
-
- lib/google/cloud/translate/
|
223
|
-
- lib/google/cloud/translate/
|
224
|
-
- lib/google/cloud/translate/
|
225
|
-
- lib/google/cloud/translate/
|
226
|
-
- lib/google/cloud/translate/
|
212
|
+
- lib/google/cloud/translate/v2.rb
|
213
|
+
- lib/google/cloud/translate/v2/api.rb
|
214
|
+
- lib/google/cloud/translate/v2/credentials.rb
|
215
|
+
- lib/google/cloud/translate/v2/detection.rb
|
216
|
+
- lib/google/cloud/translate/v2/language.rb
|
217
|
+
- lib/google/cloud/translate/v2/service.rb
|
218
|
+
- lib/google/cloud/translate/v2/translation.rb
|
219
|
+
- lib/google/cloud/translate/v3.rb
|
220
|
+
- lib/google/cloud/translate/v3/credentials.rb
|
221
|
+
- lib/google/cloud/translate/v3/doc/google/cloud/translate/v3/translation_service.rb
|
222
|
+
- lib/google/cloud/translate/v3/doc/google/longrunning/operations.rb
|
223
|
+
- lib/google/cloud/translate/v3/doc/google/protobuf/any.rb
|
224
|
+
- lib/google/cloud/translate/v3/doc/google/protobuf/timestamp.rb
|
225
|
+
- lib/google/cloud/translate/v3/doc/google/rpc/status.rb
|
226
|
+
- lib/google/cloud/translate/v3/translation_service_client.rb
|
227
|
+
- lib/google/cloud/translate/v3/translation_service_client_config.json
|
228
|
+
- lib/google/cloud/translate/v3/translation_service_pb.rb
|
229
|
+
- lib/google/cloud/translate/v3/translation_service_services_pb.rb
|
227
230
|
- lib/google/cloud/translate/version.rb
|
228
231
|
homepage: https://github.com/googleapis/google-cloud-ruby/tree/master/google-cloud-translate
|
229
232
|
licenses:
|
230
233
|
- Apache-2.0
|
231
234
|
metadata: {}
|
232
|
-
post_install_message:
|
235
|
+
post_install_message: |
|
236
|
+
The 2.0 release introduces breaking changes by defaulting to a
|
237
|
+
new generated v3 API client. This gem continues to contain the
|
238
|
+
legacy hand-written v2 client for backward compatibility aside
|
239
|
+
from the default client constructor.
|
240
|
+
|
241
|
+
For more details please visit the 2.0.0 CHANGELOG:
|
242
|
+
https://googleapis.dev/ruby/google-cloud-translate/v2.0.0/file.CHANGELOG.html#2_0_0___2019-10-28
|
233
243
|
rdoc_options: []
|
234
244
|
require_paths:
|
235
245
|
- lib
|
@@ -237,15 +247,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
237
247
|
requirements:
|
238
248
|
- - ">="
|
239
249
|
- !ruby/object:Gem::Version
|
240
|
-
version: 2.
|
250
|
+
version: '2.4'
|
241
251
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
242
252
|
requirements:
|
243
253
|
- - ">="
|
244
254
|
- !ruby/object:Gem::Version
|
245
255
|
version: '0'
|
246
256
|
requirements: []
|
247
|
-
rubygems_version: 3.0.
|
257
|
+
rubygems_version: 3.0.6
|
248
258
|
signing_key:
|
249
259
|
specification_version: 4
|
250
|
-
summary: API Client library for
|
260
|
+
summary: API Client library for Cloud Translation API
|
251
261
|
test_files: []
|