Skip to content

Commit f7ae372

Browse files
alixhamianguillanneuf
authored andcommitted
samples: Update AutoML region tags to use standard product prefixes (#1200)
1 parent 5bd80d5 commit f7ae372

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

automl/snippets/src/main/java/com/google/cloud/translate/automl/DatasetApi.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
*/
4646
public class DatasetApi {
4747

48-
// [START automl_translation_create_dataset]
48+
// [START automl_translate_create_dataset]
4949
/**
5050
* Demonstrates using the AutoML client to create a dataset
5151
*
@@ -102,9 +102,9 @@ public static void createDataset(
102102
System.out.println(String.format("\tseconds: %s", dataset.getCreateTime().getSeconds()));
103103
System.out.println(String.format("\tnanos: %s", dataset.getCreateTime().getNanos()));
104104
}
105-
// [END automl_translation_create_dataset]
105+
// [END automl_translate_create_dataset]
106106

107-
// [START automl_translation_list_datasets]
107+
// [START automl_translate_list_datasets]
108108
/**
109109
* Demonstrates using the AutoML client to list all datasets.
110110
*
@@ -151,9 +151,9 @@ public static void listDatasets(String projectId, String computeRegion, String f
151151
System.out.println(String.format("\tnanos: %s", dataset.getCreateTime().getNanos()));
152152
}
153153
}
154-
// [END automl_translation_list_datasets]
154+
// [END automl_translate_list_datasets]
155155

156-
// [START automl_translation_get_dataset]
156+
// [START automl_translate_get_dataset]
157157
/**
158158
* Demonstrates using the AutoML client to get a dataset by ID.
159159
*
@@ -193,9 +193,9 @@ public static void getDataset(String projectId, String computeRegion, String dat
193193
System.out.println(String.format("\tseconds: %s", dataset.getCreateTime().getSeconds()));
194194
System.out.println(String.format("\tnanos: %s", dataset.getCreateTime().getNanos()));
195195
}
196-
// [END automl_translation_get_dataset]
196+
// [END automl_translate_get_dataset]
197197

198-
// [START automl_translation_import_data]
198+
// [START automl_translate_import_data]
199199
/**
200200
* Import sentence pairs to the dataset.
201201
*
@@ -228,9 +228,9 @@ public static void importData(
228228
Empty response = client.importDataAsync(datasetFullId, inputConfig).get();
229229
System.out.println(String.format("Dataset imported. %s", response));
230230
}
231-
// [END automl_translation_import_data]
231+
// [END automl_translate_import_data]
232232

233-
// [START automl_translation_delete_dataset]
233+
// [START automl_translate_delete_dataset]
234234
/**
235235
* Delete a dataset.
236236
*
@@ -252,7 +252,7 @@ public static void deleteDataset(String projectId, String computeRegion, String
252252

253253
System.out.println(String.format("Dataset deleted. %s", response));
254254
}
255-
// [END automl_translation_delete_dataset]
255+
// [END automl_translate_delete_dataset]
256256

257257
public static void main(String[] args) throws Exception {
258258
DatasetApi datasetApi = new DatasetApi();

automl/snippets/src/main/java/com/google/cloud/translate/automl/ModelApi.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
*/
5050
public class ModelApi {
5151

52-
// [START automl_translation_create_model]
52+
// [START automl_translate_create_model]
5353
/**
5454
* Demonstrates using the AutoML client to create a model.
5555
*
@@ -87,9 +87,9 @@ public static void createModel(
8787
String.format("Training operation name: %s", response.getInitialFuture().get().getName()));
8888
System.out.println("Training started...");
8989
}
90-
// [END automl_translation_create_model]
90+
// [END automl_translate_create_model]
9191

92-
// [START automl_translation_list_models]
92+
// [START automl_translate_list_models]
9393
/**
9494
* Demonstrates using the AutoML client to list all models.
9595
*
@@ -128,9 +128,9 @@ public static void listModels(String projectId, String computeRegion, String fil
128128
System.out.println(String.format("Model deployment state: %s", model.getDeploymentState()));
129129
}
130130
}
131-
// [END automl_translation_list_models]
131+
// [END automl_translate_list_models]
132132

133-
// [START automl_translation_get_model]
133+
// [START automl_translate_get_model]
134134
/**
135135
* Demonstrates using the AutoML client to get model details.
136136
*
@@ -161,9 +161,9 @@ public static void getModel(String projectId, String computeRegion, String model
161161
System.out.println(String.format("\tnanos: %s", model.getCreateTime().getNanos()));
162162
System.out.println(String.format("Model deployment state: %s", model.getDeploymentState()));
163163
}
164-
// [END automl_translation_get_model]
164+
// [END automl_translate_get_model]
165165

166-
// [START automl_translation_list_model_evaluations]
166+
// [START automl_translate_list_model_evaluations]
167167
/**
168168
* Demonstrates using the AutoML client to list model evaluations.
169169
*
@@ -195,9 +195,9 @@ public static void listModelEvaluations(
195195
System.out.println(element);
196196
}
197197
}
198-
// [END automl_translation_list_model_evaluations]
198+
// [END automl_translate_list_model_evaluations]
199199

200-
// [START automl_translation_get_model_evaluation]
200+
// [START automl_translate_get_model_evaluation]
201201
/**
202202
* Demonstrates using the AutoML client to get model evaluations.
203203
*
@@ -222,9 +222,9 @@ public static void getModelEvaluation(
222222

223223
System.out.println(response);
224224
}
225-
// [END automl_translation_get_model_evaluation]
225+
// [END automl_translate_get_model_evaluation]
226226

227-
// [START automl_translation_delete_model]
227+
// [START automl_translate_delete_model]
228228
/**
229229
* Demonstrates using the AutoML client to delete a model.
230230
*
@@ -246,9 +246,9 @@ public static void deleteModel(String projectId, String computeRegion, String mo
246246

247247
System.out.println("Model deletion started...");
248248
}
249-
// [END automl_translation_delete_model]
249+
// [END automl_translate_delete_model]
250250

251-
// [START automl_translation_get_operation_status]
251+
// [START automl_translate_get_operation_status]
252252
/**
253253
* Demonstrates using the AutoML client to get operation status.
254254
*
@@ -265,7 +265,7 @@ private static void getOperationStatus(String operationFullId) throws IOExceptio
265265

266266
System.out.println(String.format("Operation status: %s", response));
267267
}
268-
// [END automl_translation_get_operation_status]
268+
// [END automl_translate_get_operation_status]
269269

270270
public static void main(String[] args) throws Exception {
271271
ModelApi modelApi = new ModelApi();

automl/snippets/src/main/java/com/google/cloud/translate/automl/PredictionApi.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
*/
5353
public class PredictionApi {
5454

55-
// [START automl_translation_predict]
55+
// [START automl_translate_predict]
5656

5757
/**
5858
* Demonstrates using the AutoML client to predict an image.
@@ -65,7 +65,7 @@ public class PredictionApi {
6565
*/
6666
public static void predict(
6767
String projectId, String computeRegion, String modelId, String filePath) throws IOException {
68-
68+
6969
// Instantiate client for prediction service.
7070
PredictionServiceClient predictionClient = PredictionServiceClient.create();
7171

@@ -88,7 +88,7 @@ public static void predict(
8888

8989
System.out.println(String.format("Translated Content: %s", translatedContent.getContent()));
9090
}
91-
// [END automl_translation_predict]
91+
// [END automl_translate_predict]
9292

9393
public static void main(String[] args) throws IOException {
9494
PredictionApi predictApi = new PredictionApi();

0 commit comments

Comments
 (0)