From f7ae372ffa19b2d7c175323c2680d522fc077c67 Mon Sep 17 00:00:00 2001 From: Alix Hamilton Date: Wed, 29 Aug 2018 12:24:23 -0700 Subject: [PATCH] samples: Update AutoML region tags to use standard product prefixes (#1200) --- .../cloud/translate/automl/DatasetApi.java | 20 ++++++------- .../cloud/translate/automl/ModelApi.java | 28 +++++++++---------- .../cloud/translate/automl/PredictionApi.java | 6 ++-- 3 files changed, 27 insertions(+), 27 deletions(-) diff --git a/automl/snippets/src/main/java/com/google/cloud/translate/automl/DatasetApi.java b/automl/snippets/src/main/java/com/google/cloud/translate/automl/DatasetApi.java index e357f12e6b0..af569360b8f 100644 --- a/automl/snippets/src/main/java/com/google/cloud/translate/automl/DatasetApi.java +++ b/automl/snippets/src/main/java/com/google/cloud/translate/automl/DatasetApi.java @@ -45,7 +45,7 @@ */ public class DatasetApi { - // [START automl_translation_create_dataset] + // [START automl_translate_create_dataset] /** * Demonstrates using the AutoML client to create a dataset * @@ -102,9 +102,9 @@ public static void createDataset( System.out.println(String.format("\tseconds: %s", dataset.getCreateTime().getSeconds())); System.out.println(String.format("\tnanos: %s", dataset.getCreateTime().getNanos())); } - // [END automl_translation_create_dataset] + // [END automl_translate_create_dataset] - // [START automl_translation_list_datasets] + // [START automl_translate_list_datasets] /** * Demonstrates using the AutoML client to list all datasets. * @@ -151,9 +151,9 @@ public static void listDatasets(String projectId, String computeRegion, String f System.out.println(String.format("\tnanos: %s", dataset.getCreateTime().getNanos())); } } - // [END automl_translation_list_datasets] + // [END automl_translate_list_datasets] - // [START automl_translation_get_dataset] + // [START automl_translate_get_dataset] /** * Demonstrates using the AutoML client to get a dataset by ID. * @@ -193,9 +193,9 @@ public static void getDataset(String projectId, String computeRegion, String dat System.out.println(String.format("\tseconds: %s", dataset.getCreateTime().getSeconds())); System.out.println(String.format("\tnanos: %s", dataset.getCreateTime().getNanos())); } - // [END automl_translation_get_dataset] + // [END automl_translate_get_dataset] - // [START automl_translation_import_data] + // [START automl_translate_import_data] /** * Import sentence pairs to the dataset. * @@ -228,9 +228,9 @@ public static void importData( Empty response = client.importDataAsync(datasetFullId, inputConfig).get(); System.out.println(String.format("Dataset imported. %s", response)); } - // [END automl_translation_import_data] + // [END automl_translate_import_data] - // [START automl_translation_delete_dataset] + // [START automl_translate_delete_dataset] /** * Delete a dataset. * @@ -252,7 +252,7 @@ public static void deleteDataset(String projectId, String computeRegion, String System.out.println(String.format("Dataset deleted. %s", response)); } - // [END automl_translation_delete_dataset] + // [END automl_translate_delete_dataset] public static void main(String[] args) throws Exception { DatasetApi datasetApi = new DatasetApi(); diff --git a/automl/snippets/src/main/java/com/google/cloud/translate/automl/ModelApi.java b/automl/snippets/src/main/java/com/google/cloud/translate/automl/ModelApi.java index c720c3d5f40..1769d81bcc0 100644 --- a/automl/snippets/src/main/java/com/google/cloud/translate/automl/ModelApi.java +++ b/automl/snippets/src/main/java/com/google/cloud/translate/automl/ModelApi.java @@ -49,7 +49,7 @@ */ public class ModelApi { - // [START automl_translation_create_model] + // [START automl_translate_create_model] /** * Demonstrates using the AutoML client to create a model. * @@ -87,9 +87,9 @@ public static void createModel( String.format("Training operation name: %s", response.getInitialFuture().get().getName())); System.out.println("Training started..."); } - // [END automl_translation_create_model] + // [END automl_translate_create_model] - // [START automl_translation_list_models] + // [START automl_translate_list_models] /** * Demonstrates using the AutoML client to list all models. * @@ -128,9 +128,9 @@ public static void listModels(String projectId, String computeRegion, String fil System.out.println(String.format("Model deployment state: %s", model.getDeploymentState())); } } - // [END automl_translation_list_models] + // [END automl_translate_list_models] - // [START automl_translation_get_model] + // [START automl_translate_get_model] /** * Demonstrates using the AutoML client to get model details. * @@ -161,9 +161,9 @@ public static void getModel(String projectId, String computeRegion, String model System.out.println(String.format("\tnanos: %s", model.getCreateTime().getNanos())); System.out.println(String.format("Model deployment state: %s", model.getDeploymentState())); } - // [END automl_translation_get_model] + // [END automl_translate_get_model] - // [START automl_translation_list_model_evaluations] + // [START automl_translate_list_model_evaluations] /** * Demonstrates using the AutoML client to list model evaluations. * @@ -195,9 +195,9 @@ public static void listModelEvaluations( System.out.println(element); } } - // [END automl_translation_list_model_evaluations] + // [END automl_translate_list_model_evaluations] - // [START automl_translation_get_model_evaluation] + // [START automl_translate_get_model_evaluation] /** * Demonstrates using the AutoML client to get model evaluations. * @@ -222,9 +222,9 @@ public static void getModelEvaluation( System.out.println(response); } - // [END automl_translation_get_model_evaluation] + // [END automl_translate_get_model_evaluation] - // [START automl_translation_delete_model] + // [START automl_translate_delete_model] /** * Demonstrates using the AutoML client to delete a model. * @@ -246,9 +246,9 @@ public static void deleteModel(String projectId, String computeRegion, String mo System.out.println("Model deletion started..."); } - // [END automl_translation_delete_model] + // [END automl_translate_delete_model] - // [START automl_translation_get_operation_status] + // [START automl_translate_get_operation_status] /** * Demonstrates using the AutoML client to get operation status. * @@ -265,7 +265,7 @@ private static void getOperationStatus(String operationFullId) throws IOExceptio System.out.println(String.format("Operation status: %s", response)); } - // [END automl_translation_get_operation_status] + // [END automl_translate_get_operation_status] public static void main(String[] args) throws Exception { ModelApi modelApi = new ModelApi(); diff --git a/automl/snippets/src/main/java/com/google/cloud/translate/automl/PredictionApi.java b/automl/snippets/src/main/java/com/google/cloud/translate/automl/PredictionApi.java index 15a2085b650..647e17ff94a 100644 --- a/automl/snippets/src/main/java/com/google/cloud/translate/automl/PredictionApi.java +++ b/automl/snippets/src/main/java/com/google/cloud/translate/automl/PredictionApi.java @@ -52,7 +52,7 @@ */ public class PredictionApi { - // [START automl_translation_predict] + // [START automl_translate_predict] /** * Demonstrates using the AutoML client to predict an image. @@ -65,7 +65,7 @@ public class PredictionApi { */ public static void predict( String projectId, String computeRegion, String modelId, String filePath) throws IOException { - + // Instantiate client for prediction service. PredictionServiceClient predictionClient = PredictionServiceClient.create(); @@ -88,7 +88,7 @@ public static void predict( System.out.println(String.format("Translated Content: %s", translatedContent.getContent())); } - // [END automl_translation_predict] + // [END automl_translate_predict] public static void main(String[] args) throws IOException { PredictionApi predictApi = new PredictionApi();