Skip to content

Commit 3146b1c

Browse files
authored
Update AutoML region tags to use standard product prefixes (GoogleCloudPlatform#1200)
1 parent eb8f5d5 commit 3146b1c

File tree

6 files changed

+57
-57
lines changed

6 files changed

+57
-57
lines changed

language/automl/src/main/java/com/google/cloud/language/samples/DatasetApi.java

+12-12
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
*/
4848
public class DatasetApi {
4949

50-
// [START automl_natural_language_create_dataset]
50+
// [START automl_language_create_dataset]
5151
/**
5252
* Demonstrates using the AutoML client to create a dataset
5353
*
@@ -101,9 +101,9 @@ public static void createDataset(
101101
System.out.println(String.format("\tseconds: %s", dataset.getCreateTime().getSeconds()));
102102
System.out.println(String.format("\tnanos: %s", dataset.getCreateTime().getNanos()));
103103
}
104-
// [END automl_natural_language_create_dataset]
104+
// [END automl_language_create_dataset]
105105

106-
// [START automl_natural_language_list_datasets]
106+
// [START automl_language_list_datasets]
107107
/**
108108
* Demonstrates using the AutoML client to list all datasets.
109109
*
@@ -145,9 +145,9 @@ public static void listDatasets(String projectId, String computeRegion, String f
145145
System.out.println(String.format("\tnanos: %s", dataset.getCreateTime().getNanos()));
146146
}
147147
}
148-
// [END automl_natural_language_list_datasets]
148+
// [END automl_language_list_datasets]
149149

150-
// [START automl_natural_language_get_dataset]
150+
// [START automl_language_get_dataset]
151151
/**
152152
* Demonstrates using the AutoML client to get a dataset by ID.
153153
*
@@ -181,9 +181,9 @@ public static void getDataset(String projectId, String computeRegion, String dat
181181
System.out.println(String.format("\tseconds: %s", dataset.getCreateTime().getSeconds()));
182182
System.out.println(String.format("\tnanos: %s", dataset.getCreateTime().getNanos()));
183183
}
184-
// [END automl_natural_language_get_dataset]
184+
// [END automl_language_get_dataset]
185185

186-
// [START automl_natural_language_import_data]
186+
// [START automl_language_import_data]
187187
/**
188188
* Import labeled items.
189189
*
@@ -217,9 +217,9 @@ public static void importData(
217217
Empty response = client.importDataAsync(datasetFullId, inputConfig).get();
218218
System.out.println(String.format("Dataset imported. %s", response));
219219
}
220-
// [END automl_natural_language_import_data]
220+
// [END automl_language_import_data]
221221

222-
// [START automl_natural_language_export_data]
222+
// [START automl_language_export_data]
223223
/**
224224
* Demonstrates using the AutoML client to export a dataset to a Google Cloud Storage bucket.
225225
*
@@ -247,9 +247,9 @@ public static void exportData(
247247
Empty response = client.exportDataAsync(datasetFullId, outputConfig).get();
248248
System.out.println(String.format("Dataset exported. %s", response));
249249
}
250-
// [END automl_natural_language_export_data]
250+
// [END automl_language_export_data]
251251

252-
// [START automl_natural_language_delete_dataset]
252+
// [START automl_language_delete_dataset]
253253
/**
254254
* Delete a dataset.
255255
*
@@ -271,7 +271,7 @@ public static void deleteDataset(String projectId, String computeRegion, String
271271

272272
System.out.println(String.format("Dataset deleted. %s", response));
273273
}
274-
// [END automl_natural_language_delete_dataset]
274+
// [END automl_language_delete_dataset]
275275

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

language/automl/src/main/java/com/google/cloud/language/samples/ModelApi.java

+16-16
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
*/
5353
public class ModelApi {
5454

55-
// [START automl_natural_language_create_model]
55+
// [START automl_language_create_model]
5656
/**
5757
* Demonstrates using the AutoML client to create a model.
5858
*
@@ -92,9 +92,9 @@ public static void createModel(
9292
String.format("Training operation name: %s", response.getInitialFuture().get().getName()));
9393
System.out.println("Training started...");
9494
}
95-
// [END automl_natural_language_create_model]
95+
// [END automl_language_create_model]
9696

97-
// [START automl_natural_language_get_operation_status]
97+
// [START automl_language_get_operation_status]
9898
/**
9999
* Demonstrates using the AutoML client to get operation status.
100100
*
@@ -111,9 +111,9 @@ public static void getOperationStatus(String operationFullId) throws IOException
111111

112112
System.out.println(String.format("Operation status: %s", response));
113113
}
114-
// [END automl_natural_language_get_operation_status]
114+
// [END automl_language_get_operation_status]
115115

116-
// [START automl_natural_language_list_models]
116+
// [START automl_language_list_models]
117117
/**
118118
* Demonstrates using the AutoML client to list all models.
119119
*
@@ -151,9 +151,9 @@ public static void listModels(String projectId, String computeRegion, String fil
151151
System.out.println(String.format("Model deployment state: %s", model.getDeploymentState()));
152152
}
153153
}
154-
// [END automl_natural_language_list_models]
154+
// [END automl_language_list_models]
155155

156-
// [START automl_natural_language_get_model]
156+
// [START automl_language_get_model]
157157
/**
158158
* Demonstrates using the AutoML client to get model details.
159159
*
@@ -184,9 +184,9 @@ public static void getModel(String projectId, String computeRegion, String model
184184
System.out.println(String.format("\tnanos: %s", model.getCreateTime().getNanos()));
185185
System.out.println(String.format("Model deployment state: %s", model.getDeploymentState()));
186186
}
187-
// END automl_natural_language_get_model]
187+
// END automl_language_get_model]
188188

189-
// [START automl_natural_language_list_model_evaluations]
189+
// [START automl_language_list_model_evaluations]
190190
/**
191191
* Demonstrates using the AutoML client to list model evaluations.
192192
*
@@ -217,9 +217,9 @@ public static void listModelEvaluations(
217217
System.out.println(element);
218218
}
219219
}
220-
// [END automl_natural_language_list_model_evaluations]
220+
// [END automl_language_list_model_evaluations]
221221

222-
// [START automl_natural_language_get_model_evaluation]
222+
// [START automl_language_get_model_evaluation]
223223
/**
224224
* Demonstrates using the AutoML client to get model evaluations.
225225
*
@@ -244,9 +244,9 @@ public static void getModelEvaluation(
244244

245245
System.out.println(response);
246246
}
247-
// [END automl_natural_language_get_model_evaluation]
247+
// [END automl_language_get_model_evaluation]
248248

249-
// [START automl_natural_language_display_evaluation]
249+
// [START automl_language_display_evaluation]
250250
/**
251251
* Demonstrates using the AutoML client to display model evaluation.
252252
*
@@ -317,9 +317,9 @@ public static void displayEvaluation(
317317
}
318318
}
319319
}
320-
// [END automl_natural_language_display_evaluation]
320+
// [END automl_language_display_evaluation]
321321

322-
// [START automl_natural_language_delete_model]
322+
// [START automl_language_delete_model]
323323
/**
324324
* Demonstrates using the AutoML client to delete a model.
325325
*
@@ -341,7 +341,7 @@ public static void deleteModel(String projectId, String computeRegion, String mo
341341

342342
System.out.println("Model deletion started...");
343343
}
344-
// [END automl_natural_language_delete_model]
344+
// [END automl_language_delete_model]
345345

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

language/automl/src/main/java/com/google/cloud/language/samples/PredictionApi.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
*/
4747
public class PredictionApi {
4848

49-
// [START automl_natural_language_predict]
49+
// [START automl_language_predict]
5050
/**
5151
* Demonstrates using the AutoML client to classify the text content
5252
*
@@ -85,7 +85,7 @@ public static void predict(
8585
"Predicted Class Score :" + annotationPayload.getClassification().getScore());
8686
}
8787
}
88-
// [END automl_natural_language_predict]
88+
// [END automl_language_predict]
8989

9090
public static void main(String[] args) throws IOException {
9191
PredictionApi predictionApi = new PredictionApi();

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

+10-10
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();

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

+14-14
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();

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

+3-3
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)