From b3a53824967855d3ddb56635a8419615cba555e9 Mon Sep 17 00:00:00 2001
From: Alix Hamilton <ajhamilton@google.com>
Date: Wed, 29 Aug 2018 12:37:06 -0700
Subject: [PATCH] Update AutoML region tags to use standard product prefixes
 [(#1669)](https://github.com/GoogleCloudPlatform/python-docs-samples/issues/1669)

---
 .../snippets/automl_translation_dataset.py    | 20 ++++++-------
 .../snippets/automl_translation_model.py      | 28 +++++++++----------
 .../snippets/automl_translation_predict.py    |  4 +--
 3 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/samples/samples/snippets/automl_translation_dataset.py b/samples/samples/snippets/automl_translation_dataset.py
index e579ac35..c60ef544 100755
--- a/samples/samples/snippets/automl_translation_dataset.py
+++ b/samples/samples/snippets/automl_translation_dataset.py
@@ -27,7 +27,7 @@
 
 def create_dataset(project_id, compute_region, dataset_name, source, target):
     """Create a dataset."""
-    # [START automl_translation_create_dataset]
+    # [START automl_translate_create_dataset]
     # TODO(developer): Uncomment and set the following variables
     # project_id = 'PROJECT_ID_HERE'
     # compute_region = 'COMPUTE_REGION_HERE'
@@ -75,12 +75,12 @@ def create_dataset(project_id, compute_region, dataset_name, source, target):
     print("\tseconds: {}".format(dataset.create_time.seconds))
     print("\tnanos: {}".format(dataset.create_time.nanos))
 
-    # [END automl_translation_create_dataset]
+    # [END automl_translate_create_dataset]
 
 
 def list_datasets(project_id, compute_region, filter_):
     """List Datasets."""
-    # [START automl_translation_list_datasets]
+    # [START automl_translate_list_datasets]
     # TODO(developer): Uncomment and set the following variables
     # project_id = 'PROJECT_ID_HERE'
     # compute_region = 'COMPUTE_REGION_HERE'
@@ -117,12 +117,12 @@ def list_datasets(project_id, compute_region, filter_):
         print("\tseconds: {}".format(dataset.create_time.seconds))
         print("\tnanos: {}".format(dataset.create_time.nanos))
 
-    # [END automl_translation_list_datasets]
+    # [END automl_translate_list_datasets]
 
 
 def get_dataset(project_id, compute_region, dataset_id):
     """Get the dataset."""
-    # [START automl_translation_get_dataset]
+    # [START automl_translate_get_dataset]
     # TODO(developer): Uncomment and set the following variables
     # project_id = 'PROJECT_ID_HERE'
     # compute_region = 'COMPUTE_REGION_HERE'
@@ -159,12 +159,12 @@ def get_dataset(project_id, compute_region, dataset_id):
     print("\tseconds: {}".format(dataset.create_time.seconds))
     print("\tnanos: {}".format(dataset.create_time.nanos))
 
-    # [END automl_translation_get_dataset]
+    # [END automl_translate_get_dataset]
 
 
 def import_data(project_id, compute_region, dataset_id, path):
     """Import sentence pairs to the dataset."""
-    # [START automl_translation_import_data]
+    # [START automl_translate_import_data]
     # TODO(developer): Uncomment and set the following variables
     # project_id = 'PROJECT_ID_HERE'
     # compute_region = 'COMPUTE_REGION_HERE'
@@ -191,12 +191,12 @@ def import_data(project_id, compute_region, dataset_id, path):
     # synchronous check of operation status
     print("Data imported. {}".format(response.result()))
 
-    # [END automl_translation_import_data]
+    # [END automl_translate_import_data]
 
 
 def delete_dataset(project_id, compute_region, dataset_id):
     """Delete a dataset."""
-    # [START automl_translation_delete_dataset]]
+    # [START automl_translate_delete_dataset]]
     # TODO(developer): Uncomment and set the following variables
     # project_id = 'PROJECT_ID_HERE'
     # compute_region = 'COMPUTE_REGION_HERE'
@@ -217,7 +217,7 @@ def delete_dataset(project_id, compute_region, dataset_id):
     # synchronous check of operation status
     print("Dataset deleted. {}".format(response.result()))
 
-    # [END automl_translation_delete_dataset]
+    # [END automl_translate_delete_dataset]
 
 
 if __name__ == "__main__":
diff --git a/samples/samples/snippets/automl_translation_model.py b/samples/samples/snippets/automl_translation_model.py
index 0b9b6f53..77a4ed73 100755
--- a/samples/samples/snippets/automl_translation_model.py
+++ b/samples/samples/snippets/automl_translation_model.py
@@ -27,7 +27,7 @@
 
 def create_model(project_id, compute_region, dataset_id, model_name):
     """Create a model."""
-    # [START automl_translation_create_model]
+    # [START automl_translate_create_model]
     # TODO(developer): Uncomment and set the following variables
     # project_id = 'PROJECT_ID_HERE'
     # compute_region = 'COMPUTE_REGION_HERE'
@@ -54,12 +54,12 @@ def create_model(project_id, compute_region, dataset_id, model_name):
     print("Training operation name: {}".format(response.operation.name))
     print("Training started...")
 
-    # [END automl_translation_create_model]
+    # [END automl_translate_create_model]
 
 
 def list_models(project_id, compute_region, filter_):
     """List all models."""
-    # [START automl_translation_list_models]
+    # [START automl_translate_list_models]
     # TODO(developer): Uncomment and set the following variables
     # project_id = 'PROJECT_ID_HERE'
     # compute_region = 'COMPUTE_REGION_HERE'
@@ -92,12 +92,12 @@ def list_models(project_id, compute_region, filter_):
         print("\tnanos: {}".format(model.create_time.nanos))
         print("Model deployment state: {}".format(deployment_state))
 
-    # [END automl_translation_list_models]
+    # [END automl_translate_list_models]
 
 
 def get_model(project_id, compute_region, model_id):
     """Get model details."""
-    # [START automl_translation_get_model]
+    # [START automl_translate_get_model]
     # TODO(developer): Uncomment and set the following variables
     # project_id = 'PROJECT_ID_HERE'
     # compute_region = 'COMPUTE_REGION_HERE'
@@ -129,12 +129,12 @@ def get_model(project_id, compute_region, model_id):
     print("\tnanos: {}".format(model.create_time.nanos))
     print("Model deployment state: {}".format(deployment_state))
 
-    # [END automl_translation_get_model]
+    # [END automl_translate_get_model]
 
 
 def list_model_evaluations(project_id, compute_region, model_id, filter_):
     """List model evaluations."""
-    # [START automl_translation_list_model_evaluations]
+    # [START automl_translate_list_model_evaluations]
     # TODO(developer): Uncomment and set the following variables
     # project_id = 'PROJECT_ID_HERE'
     # compute_region = 'COMPUTE_REGION_HERE'
@@ -152,14 +152,14 @@ def list_model_evaluations(project_id, compute_region, model_id, filter_):
     for element in client.list_model_evaluations(model_full_id, filter_):
         print(element)
 
-    # [END automl_translation_list_model_evaluations]
+    # [END automl_translate_list_model_evaluations]
 
 
 def get_model_evaluation(
     project_id, compute_region, model_id, model_evaluation_id
 ):
     """Get model evaluation."""
-    # [START automl_translation_get_model_evaluation]
+    # [START automl_translate_get_model_evaluation]
     # TODO(developer): Uncomment and set the following variables
     # project_id = 'PROJECT_ID_HERE'
     # compute_region = 'COMPUTE_REGION_HERE'
@@ -180,12 +180,12 @@ def get_model_evaluation(
 
     print(response)
 
-    # [END automl_translation_get_model_evaluation]
+    # [END automl_translate_get_model_evaluation]
 
 
 def delete_model(project_id, compute_region, model_id):
     """Delete a model."""
-    # [START automl_translation_delete_model]
+    # [START automl_translate_delete_model]
     # TODO(developer): Uncomment and set the following variables
     # project_id = 'PROJECT_ID_HERE'
     # compute_region = 'COMPUTE_REGION_HERE'
@@ -204,12 +204,12 @@ def delete_model(project_id, compute_region, model_id):
     # synchronous check of operation status.
     print("Model deleted. {}".format(response.result()))
 
-    # [END automl_translation_delete_model]
+    # [END automl_translate_delete_model]
 
 
 def get_operation_status(operation_full_id):
     """Get operation status."""
-    # [START automl_translation_get_operation_status]
+    # [START automl_translate_get_operation_status]
     # TODO(developer): Uncomment and set the following variables
     # operation_full_id =
     #   'projects/<projectId>/locations/<region>/operations/<operationId>'
@@ -225,7 +225,7 @@ def get_operation_status(operation_full_id):
 
     print("Operation status: {}".format(response))
 
-    # [END automl_translation_get_operation_status]
+    # [END automl_translate_get_operation_status]
 
 
 if __name__ == "__main__":
diff --git a/samples/samples/snippets/automl_translation_predict.py b/samples/samples/snippets/automl_translation_predict.py
index 653cf388..b15e0e30 100644
--- a/samples/samples/snippets/automl_translation_predict.py
+++ b/samples/samples/snippets/automl_translation_predict.py
@@ -27,7 +27,7 @@
 
 def predict(project_id, compute_region, model_id, file_path):
     """Translate the content."""
-    # [START automl_translation_predict]
+    # [START automl_translate_predict]
     # project_id = 'PROJECT_ID_HERE'
     # compute_region = 'COMPUTE_REGION_HERE'
     # model_id = 'MODEL_ID_HERE'
@@ -61,7 +61,7 @@ def predict(project_id, compute_region, model_id, file_path):
 
     print(u"Translated content: {}".format(translated_content.content))
 
-    # [END automl_translation_predict]
+    # [END automl_translate_predict]
 
 
 if __name__ == "__main__":