google-cloud-translate-v3 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/translate/v3/adaptive_mt_pb.rb +5 -1
- data/lib/google/cloud/translate/v3/automl_translation_pb.rb +78 -0
- data/lib/google/cloud/translate/v3/bindings_override.rb +102 -0
- data/lib/google/cloud/translate/v3/common_pb.rb +7 -1
- data/lib/google/cloud/translate/v3/rest.rb +1 -0
- data/lib/google/cloud/translate/v3/translation_service/client.rb +2151 -290
- data/lib/google/cloud/translate/v3/translation_service/paths.rb +59 -0
- data/lib/google/cloud/translate/v3/translation_service/rest/client.rb +2021 -278
- data/lib/google/cloud/translate/v3/translation_service/rest/service_stub.rb +1258 -180
- data/lib/google/cloud/translate/v3/translation_service/rest.rb +1 -0
- data/lib/google/cloud/translate/v3/translation_service_pb.rb +21 -3
- data/lib/google/cloud/translate/v3/translation_service_services_pb.rb +37 -0
- data/lib/google/cloud/translate/v3/version.rb +1 -1
- data/proto_docs/google/api/client.rb +14 -10
- data/proto_docs/google/api/resource.rb +7 -2
- data/proto_docs/google/cloud/translate/v3/adaptive_mt.rb +71 -1
- data/proto_docs/google/cloud/translate/v3/automl_translation.rb +487 -0
- data/proto_docs/google/cloud/translate/v3/common.rb +78 -0
- data/proto_docs/google/cloud/translate/v3/translation_service.rb +207 -14
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- metadata +46 -2
@@ -64,6 +64,25 @@ module Google
|
|
64
64
|
"projects/#{project}/locations/#{location}/adaptiveMtDatasets/#{dataset}/adaptiveMtFiles/#{file}"
|
65
65
|
end
|
66
66
|
|
67
|
+
##
|
68
|
+
# Create a fully-qualified Dataset resource string.
|
69
|
+
#
|
70
|
+
# The resource will be in the following format:
|
71
|
+
#
|
72
|
+
# `projects/{project}/locations/{location}/datasets/{dataset}`
|
73
|
+
#
|
74
|
+
# @param project [String]
|
75
|
+
# @param location [String]
|
76
|
+
# @param dataset [String]
|
77
|
+
#
|
78
|
+
# @return [::String]
|
79
|
+
def dataset_path project:, location:, dataset:
|
80
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
81
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
82
|
+
|
83
|
+
"projects/#{project}/locations/#{location}/datasets/#{dataset}"
|
84
|
+
end
|
85
|
+
|
67
86
|
##
|
68
87
|
# Create a fully-qualified Glossary resource string.
|
69
88
|
#
|
@@ -83,6 +102,27 @@ module Google
|
|
83
102
|
"projects/#{project}/locations/#{location}/glossaries/#{glossary}"
|
84
103
|
end
|
85
104
|
|
105
|
+
##
|
106
|
+
# Create a fully-qualified GlossaryEntry resource string.
|
107
|
+
#
|
108
|
+
# The resource will be in the following format:
|
109
|
+
#
|
110
|
+
# `projects/{project}/locations/{location}/glossaries/{glossary}/glossaryEntries/{glossary_entry}`
|
111
|
+
#
|
112
|
+
# @param project [String]
|
113
|
+
# @param location [String]
|
114
|
+
# @param glossary [String]
|
115
|
+
# @param glossary_entry [String]
|
116
|
+
#
|
117
|
+
# @return [::String]
|
118
|
+
def glossary_entry_path project:, location:, glossary:, glossary_entry:
|
119
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
120
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
121
|
+
raise ::ArgumentError, "glossary cannot contain /" if glossary.to_s.include? "/"
|
122
|
+
|
123
|
+
"projects/#{project}/locations/#{location}/glossaries/#{glossary}/glossaryEntries/#{glossary_entry}"
|
124
|
+
end
|
125
|
+
|
86
126
|
##
|
87
127
|
# Create a fully-qualified Location resource string.
|
88
128
|
#
|
@@ -100,6 +140,25 @@ module Google
|
|
100
140
|
"projects/#{project}/locations/#{location}"
|
101
141
|
end
|
102
142
|
|
143
|
+
##
|
144
|
+
# Create a fully-qualified Model resource string.
|
145
|
+
#
|
146
|
+
# The resource will be in the following format:
|
147
|
+
#
|
148
|
+
# `projects/{project}/locations/{location}/models/{model}`
|
149
|
+
#
|
150
|
+
# @param project [String]
|
151
|
+
# @param location [String]
|
152
|
+
# @param model [String]
|
153
|
+
#
|
154
|
+
# @return [::String]
|
155
|
+
def model_path project:, location:, model:
|
156
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
157
|
+
raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/"
|
158
|
+
|
159
|
+
"projects/#{project}/locations/#{location}/models/#{model}"
|
160
|
+
end
|
161
|
+
|
103
162
|
extend self
|
104
163
|
end
|
105
164
|
end
|