From 1ce6885407b6d98d678eca5ac723789dd1f3bcec Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Thu, 14 Nov 2019 16:28:37 -0800 Subject: [PATCH] refactor: clean up samples and tests (#272) --- .../create-dataset.v1beta1.js | 33 +++++----- .../entity-extraction/create-model.v1beta1.js | 31 +++++----- .../delete-dataset.v1beta1.js | 31 +++++----- .../entity-extraction/delete-model.v1beta1.js | 33 +++++----- .../entity-extraction/deploy-model.v1beta1.js | 31 +++++----- .../display-evaluation.v1beta1.js | 34 +++++------ .../entity-extraction/export-data.v1beta1.js | 31 +++++----- .../entity-extraction/get-dataset.v1beta1.js | 34 +++++------ .../get-model-evaluation.v1beta1.js | 33 +++++----- .../entity-extraction/get-model.v1beta1.js | 33 +++++----- .../get-operation-status.v1beta1.js | 31 +++++----- .../entity-extraction/import-data.v1beta1.js | 31 +++++----- .../list-datasets.v1beta1.js | 33 +++++----- .../list-model-evaluations.v1beta1.js | 33 +++++----- .../entity-extraction/list-models.v1beta1.js | 33 +++++----- .../list-operations-status.v1beta1.js | 31 +++++----- .../entity-extraction/predict.v1beta1.js | 33 +++++----- .../undeploy-model.v1beta1.js | 31 +++++----- .../create-dataset.v1beta1.js | 33 +++++----- .../create-model.v1beta1.js | 31 +++++----- .../delete-dataset.v1beta1.js | 31 +++++----- .../delete-model.v1beta1.js | 31 +++++----- .../deploy-model.v1beta1.js | 31 +++++----- .../display-evaluation.v1beta1.js | 35 ++++++----- .../sentiment-analysis/export-data.v1beta1.js | 31 +++++----- .../sentiment-analysis/get-dataset.v1beta1.js | 33 +++++----- .../get-model-evaluation.v1beta1.js | 35 ++++++----- .../sentiment-analysis/get-model.v1beta1.js | 33 +++++----- .../get-operation-status.v1beta1.js | 31 +++++----- .../sentiment-analysis/import-data.v1beta1.js | 31 +++++----- .../list-datasets.v1beta1.js | 33 +++++----- .../list-model-evaluations.v1beta1.js | 35 ++++++----- .../sentiment-analysis/list-models.v1beta1.js | 33 +++++----- .../list-operation-status.v1beta1.js | 31 +++++----- .../sentiment-analysis/predict.v1beta1.js | 33 +++++----- .../undeploy-model.v1beta1.js | 31 +++++----- automl/package.json | 17 +++--- automl/tables/create-dataset.v1beta1.js | 33 +++++----- automl/tables/create-model.v1beta1.js | 31 +++++----- automl/tables/delete-dataset.v1beta1.js | 31 +++++----- automl/tables/delete-model.v1beta1.js | 31 +++++----- automl/tables/deploy-model.v1beta1.js | 31 +++++----- automl/tables/display-evaluation.v1beta1.js | 33 +++++----- .../tables/export-data-to-bigquery.v1beta1.js | 31 +++++----- automl/tables/export-data-to-csv.v1beta1.js | 31 +++++----- .../export-evaluated-examples.v1beta1.js | 31 +++++----- automl/tables/get-column-spec.v1beta1.js | 31 +++++----- automl/tables/get-dataset.v1beta1.js | 33 +++++----- automl/tables/get-model-evaluation.v1beta1.js | 33 +++++----- automl/tables/get-model.v1beta1.js | 31 +++++----- automl/tables/get-operation-status.v1beta1.js | 31 +++++----- automl/tables/get-table-spec.v1beta1.js | 31 +++++----- automl/tables/import-data.v1beta1.js | 31 +++++----- automl/tables/list-column-specs.v1beta1.js | 31 +++++----- automl/tables/list-datasets.v1beta1.js | 33 +++++----- .../tables/list-model-evaluations.v1beta1.js | 33 +++++----- automl/tables/list-models.v1beta1.js | 31 +++++----- .../tables/list-operation-status.v1beta1.js | 31 +++++----- automl/tables/list-table-specs.v1beta1.js | 31 +++++----- .../predict-bq-source-bq-dest.v1beta1.js | 31 +++++----- .../predict-bq-source-gcs-dest.v1beta1.js | 31 +++++----- .../predict-gcs-source-bq-dest.v1beta1.js | 31 +++++----- .../predict-gcs-source-gcs-dest.v1beta1.js | 31 +++++----- automl/tables/predict.v1beta1.js | 36 +++++------ automl/tables/undeploy-model.v1beta1.js | 31 +++++----- automl/tables/update-column-spec.v1beta1.js | 31 +++++----- automl/tables/update-dataset.v1beta1.js | 31 +++++----- automl/test/.eslintrc.yml | 4 +- ...mlLangaugeSentimentDataSet.v1beta1.test.js | 49 +++++++-------- ...utomlLanguageEntityDataSet.v1beta1.test.js | 43 +++++++------ .../automlLanguageEntityModel.v1beta1.test.js | 59 ++++++++---------- ...mlLanguageEntityPrediction.v1beta1.test.js | 35 +++++------ ...tomlLanguageSentimentModel.v1beta1.test.js | 59 ++++++++---------- ...anguageSentimentPrediction.v1beta1.test.js | 33 +++++----- .../test/automlTablesDataset.v1beta1.test.js | 57 +++++++++-------- automl/test/automlTablesModel.v1beta1.test.js | 61 +++++++++---------- .../test/automlTablesPredict.v1beta1.test.js | 43 ++++++------- ...genceClassificationDataset.v1beta1.test.js | 43 +++++++------ ...ligenceClassificationModel.v1beta1.test.js | 53 ++++++++-------- ...genceClassificationPredict.v1beta1.test.js | 33 +++++----- ...sionObjectDetectionDataset.v1beta1.test.js | 27 ++++---- ...VisionObjectDetectionModel.v1beta1.test.js | 27 ++++---- ...sionObjectDetectionPredict.v1beta1.test.js | 33 +++++----- .../datasets/create-dataset.v1beta1.js | 31 +++++----- .../datasets/delete-dataset.v1beta1.js | 31 +++++----- .../translate/datasets/get-dataset.v1beta1.js | 33 +++++----- .../translate/datasets/import-data.v1beta1.js | 33 +++++----- .../datasets/list-datasets.v1beta1.js | 31 +++++----- .../translate/models/create-model.v1beta1.js | 31 +++++----- .../translate/models/delete-model.v1beta1.js | 33 +++++----- .../models/get-model-evaluation.v1beta1.js | 31 +++++----- automl/translate/models/get-model.v1beta1.js | 31 +++++----- .../models/get-operation-status.v1beta1.js | 31 +++++----- .../models/list-model-evaluations.v1beta1.js | 33 +++++----- .../translate/models/list-models.v1beta1.js | 33 +++++----- .../translate/prediction/predict.v1beta1.js | 33 +++++----- .../classification/create-dataset.v1beta1.js | 33 +++++----- .../classification/create-model.v1beta1.js | 31 +++++----- .../classification/delete-dataset.v1beta1.js | 31 +++++----- .../classification/delete-model.v1beta1.js | 31 +++++----- .../display-evaluation.v1beta1.js | 33 +++++----- .../classification/export-data.v1beta1.js | 31 +++++----- .../classification/get-dataset.v1beta1.js | 33 +++++----- .../get-model-evaluations.v1beta1.js | 33 +++++----- .../classification/get-model.v1beta1.js | 33 +++++----- .../get-operation-status.v1beta1.js | 31 +++++----- .../classification/import-data.v1beta1.js | 31 +++++----- .../classification/list-datasets.v1beta1.js | 33 +++++----- .../list-model-evaluations.v1beta1.js | 33 +++++----- .../classification/list-models.v1beta1.js | 33 +++++----- .../list-operation-status.v1beta1.js | 31 +++++----- .../classification/predict.v1beta1.js | 31 +++++----- automl/vision/automlVisionDataset.js | 2 +- automl/vision/automlVisionModel.js | 10 +-- .../create-dataset.v1beta1.js | 31 +++++----- .../object-detection/create-model.v1beta1.js | 29 +++++---- .../delete-dataset.v1beta1.js | 29 +++++---- .../object-detection/delete-model.v1beta1.js | 29 +++++---- .../object-detection/deploy-model.v1beta1.js | 29 +++++---- .../display-evaluation.v1beta1.js | 31 +++++----- .../object-detection/export-data.v1beta1.js | 29 +++++---- .../object-detection/get-dataset.v1beta1.js | 31 +++++----- .../get-model-evaluations.v1beta1.js | 31 +++++----- .../object-detection/get-model.v1beta1.js | 29 +++++---- .../get-operation-status.v1beta1.js | 29 +++++---- .../object-detection/import-data.v1beta1.js | 29 +++++---- .../object-detection/list-datasets.v1beta1.js | 31 +++++----- .../list-model-evaluations.v1beta1.js | 31 +++++----- .../object-detection/list-models.v1beta1.js | 29 +++++---- .../list-operation-status.v1beta1.js | 29 +++++---- .../object-detection/predict.v1beta1.js | 31 +++++----- .../undeploy-model.v1beta1.js | 29 +++++---- 132 files changed, 2054 insertions(+), 2206 deletions(-) diff --git a/automl/language/entity-extraction/create-dataset.v1beta1.js b/automl/language/entity-extraction/create-dataset.v1beta1.js index b16cd9be5d..442ba586ad 100644 --- a/automl/language/entity-extraction/create-dataset.v1beta1.js +++ b/automl/language/entity-extraction/create-dataset.v1beta1.js @@ -1,27 +1,26 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', datasetName = 'YOUR_DATASET_NAME' ) { // [START automl_natural_language_entity_create_dataset] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/entity-extraction/create-model.v1beta1.js b/automl/language/entity-extraction/create-model.v1beta1.js index 1949cbf766..2a22326e4c 100644 --- a/automl/language/entity-extraction/create-model.v1beta1.js +++ b/automl/language/entity-extraction/create-model.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,7 +20,7 @@ async function main( modelName = 'YOUR_MODEL_NAME' ) { // [START automl_natural_language_entity_create_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/entity-extraction/delete-dataset.v1beta1.js b/automl/language/entity-extraction/delete-dataset.v1beta1.js index 4c553b85cb..6590ee5621 100644 --- a/automl/language/entity-extraction/delete-dataset.v1beta1.js +++ b/automl/language/entity-extraction/delete-dataset.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', datasetId = 'YOUR_DATASET_ID' ) { // [START automl_natural_language_entity_delete_dataset] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/entity-extraction/delete-model.v1beta1.js b/automl/language/entity-extraction/delete-model.v1beta1.js index 6a1dff3637..4beeb20921 100644 --- a/automl/language/entity-extraction/delete-model.v1beta1.js +++ b/automl/language/entity-extraction/delete-model.v1beta1.js @@ -1,27 +1,26 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; -`use strict`; -`use strict`; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', modelId = 'YOUR_MODEL_ID' ) { // [START automl_natural_language_entity_delete_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/entity-extraction/deploy-model.v1beta1.js b/automl/language/entity-extraction/deploy-model.v1beta1.js index 2e7c75776b..b31864b87b 100644 --- a/automl/language/entity-extraction/deploy-model.v1beta1.js +++ b/automl/language/entity-extraction/deploy-model.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', modelId = 'YOUR_MODEL_ID' ) { // [START automl_natural_language_entity_deploy_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/entity-extraction/display-evaluation.v1beta1.js b/automl/language/entity-extraction/display-evaluation.v1beta1.js index e634716ee4..d6c97b35a6 100644 --- a/automl/language/entity-extraction/display-evaluation.v1beta1.js +++ b/automl/language/entity-extraction/display-evaluation.v1beta1.js @@ -1,19 +1,19 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; -`use strict`; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,8 +21,8 @@ async function main( filter = 'YOUR_FILTER_EXPRESSION' ) { // [START automl_natural_language_entity_display_evaluation] - const automl = require(`@google-cloud/automl`); - const math = require(`mathjs`); + const automl = require('@google-cloud/automl'); + const math = require('mathjs'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/entity-extraction/export-data.v1beta1.js b/automl/language/entity-extraction/export-data.v1beta1.js index 9897d4dba0..cdc66e060f 100644 --- a/automl/language/entity-extraction/export-data.v1beta1.js +++ b/automl/language/entity-extraction/export-data.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,7 +20,7 @@ async function main( gcsOutputUri = 'GCS_OUTPUT_URI' ) { // [START automl_natural_language_entity_export_data] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/entity-extraction/get-dataset.v1beta1.js b/automl/language/entity-extraction/get-dataset.v1beta1.js index 894a2ef9c7..950e23203a 100644 --- a/automl/language/entity-extraction/get-dataset.v1beta1.js +++ b/automl/language/entity-extraction/get-dataset.v1beta1.js @@ -1,27 +1,27 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; -`use strict`; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', datasetId = 'YOUR_DATASET_ID' ) { // [START automl_natural_language_entity_get_dataset] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/entity-extraction/get-model-evaluation.v1beta1.js b/automl/language/entity-extraction/get-model-evaluation.v1beta1.js index 4bef9b8911..2d2d820ca9 100644 --- a/automl/language/entity-extraction/get-model-evaluation.v1beta1.js +++ b/automl/language/entity-extraction/get-model-evaluation.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,8 +20,8 @@ async function main( modelEvaluationId = 'YOUR_MODEL_EVALUATION_ID' ) { // [START automl_natural_language_entity_get_model_evaluation] - const automl = require(`@google-cloud/automl`); - const math = require(`mathjs`); + const automl = require('@google-cloud/automl'); + const math = require('mathjs'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/entity-extraction/get-model.v1beta1.js b/automl/language/entity-extraction/get-model.v1beta1.js index 09543faf75..55ef507b2a 100644 --- a/automl/language/entity-extraction/get-model.v1beta1.js +++ b/automl/language/entity-extraction/get-model.v1beta1.js @@ -1,27 +1,26 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', modelId = 'YOUR_MODEL_ID' ) { // [START automl_natural_language_entity_get_model] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/entity-extraction/get-operation-status.v1beta1.js b/automl/language/entity-extraction/get-operation-status.v1beta1.js index b03b7d1602..64be218603 100644 --- a/automl/language/entity-extraction/get-operation-status.v1beta1.js +++ b/automl/language/entity-extraction/get-operation-status.v1beta1.js @@ -1,22 +1,21 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main(operationFullId = 'OPERATION_FULL_ID') { // [START automl_natural_language_entity_get_operation_status] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/entity-extraction/import-data.v1beta1.js b/automl/language/entity-extraction/import-data.v1beta1.js index ec6256fafb..16329a50b5 100644 --- a/automl/language/entity-extraction/import-data.v1beta1.js +++ b/automl/language/entity-extraction/import-data.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,7 +20,7 @@ async function main( gcsPath = 'GCS_PATH' ) { // [START automl_natural_language_entity_import_data] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/entity-extraction/list-datasets.v1beta1.js b/automl/language/entity-extraction/list-datasets.v1beta1.js index 30dda9dfc7..2b5e970aa7 100644 --- a/automl/language/entity-extraction/list-datasets.v1beta1.js +++ b/automl/language/entity-extraction/list-datasets.v1beta1.js @@ -1,27 +1,26 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', filter = 'YOUR_FILTER_EXPRESSION' ) { // [START automl_natural_language_entity_list_datasets] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/entity-extraction/list-model-evaluations.v1beta1.js b/automl/language/entity-extraction/list-model-evaluations.v1beta1.js index d7ec5bd790..ebca860429 100644 --- a/automl/language/entity-extraction/list-model-evaluations.v1beta1.js +++ b/automl/language/entity-extraction/list-model-evaluations.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,8 +20,8 @@ async function main( filter = 'YOUR_FILTER_EXPRESSION' ) { // [START automl_natural_language_entity_list_model_evaluations] - const automl = require(`@google-cloud/automl`); - const math = require(`mathjs`); + const automl = require('@google-cloud/automl'); + const math = require('mathjs'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/entity-extraction/list-models.v1beta1.js b/automl/language/entity-extraction/list-models.v1beta1.js index b0faa585f6..152e5cee1a 100644 --- a/automl/language/entity-extraction/list-models.v1beta1.js +++ b/automl/language/entity-extraction/list-models.v1beta1.js @@ -1,27 +1,26 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', filter = 'YOUR_FILTER_EXPRESSION' ) { // [START automl_natural_language_entity_list_models] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/entity-extraction/list-operations-status.v1beta1.js b/automl/language/entity-extraction/list-operations-status.v1beta1.js index cdc955cebd..361068e0b0 100644 --- a/automl/language/entity-extraction/list-operations-status.v1beta1.js +++ b/automl/language/entity-extraction/list-operations-status.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', filter = 'YOUR_FILTER_EXPRESSION' ) { // [START automl_natural_language_entity_list_operations_status] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/entity-extraction/predict.v1beta1.js b/automl/language/entity-extraction/predict.v1beta1.js index 4da851478f..94893690d6 100644 --- a/automl/language/entity-extraction/predict.v1beta1.js +++ b/automl/language/entity-extraction/predict.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,8 +20,8 @@ async function main( filePath = 'YOUR_LOCAL_FILE_PATH' ) { // [START automl_natural_language_entity_predict] - const automl = require(`@google-cloud/automl`); - const fs = require(`fs`); + const automl = require('@google-cloud/automl'); + const fs = require('fs'); // Create client for prediction service. const client = new automl.v1beta1.PredictionServiceClient(); diff --git a/automl/language/entity-extraction/undeploy-model.v1beta1.js b/automl/language/entity-extraction/undeploy-model.v1beta1.js index c403fbb19d..266ca8cfc2 100644 --- a/automl/language/entity-extraction/undeploy-model.v1beta1.js +++ b/automl/language/entity-extraction/undeploy-model.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', modelId = 'YOUR_MODEL_ID' ) { // [START automl_natural_language_entity_undeploy_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/sentiment-analysis/create-dataset.v1beta1.js b/automl/language/sentiment-analysis/create-dataset.v1beta1.js index bdef0655e5..d91612c96c 100644 --- a/automl/language/sentiment-analysis/create-dataset.v1beta1.js +++ b/automl/language/sentiment-analysis/create-dataset.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,8 +20,8 @@ async function main( sentimentMax = '' ) { // [START automl_natural_language_sentiment_create_dataset] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/sentiment-analysis/create-model.v1beta1.js b/automl/language/sentiment-analysis/create-model.v1beta1.js index e0e14a68bd..4f427564d7 100644 --- a/automl/language/sentiment-analysis/create-model.v1beta1.js +++ b/automl/language/sentiment-analysis/create-model.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,7 +20,7 @@ async function main( modelName = 'YOUR_MODEL_NAME' ) { // [START automl_natural_language_sentiment_create_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/sentiment-analysis/delete-dataset.v1beta1.js b/automl/language/sentiment-analysis/delete-dataset.v1beta1.js index 92385baed2..447128748e 100644 --- a/automl/language/sentiment-analysis/delete-dataset.v1beta1.js +++ b/automl/language/sentiment-analysis/delete-dataset.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', datasetId = 'YOUR_DATASET_ID' ) { // [START automl_natural_language_sentiment_delete_dataset] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/sentiment-analysis/delete-model.v1beta1.js b/automl/language/sentiment-analysis/delete-model.v1beta1.js index 365c55e0fb..88ae7aa219 100644 --- a/automl/language/sentiment-analysis/delete-model.v1beta1.js +++ b/automl/language/sentiment-analysis/delete-model.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', modelId = 'YOUR_MODEL_ID' ) { // [START automl_natural_language_sentiment_delete_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/sentiment-analysis/deploy-model.v1beta1.js b/automl/language/sentiment-analysis/deploy-model.v1beta1.js index cc65dc4e3a..be9969f06d 100644 --- a/automl/language/sentiment-analysis/deploy-model.v1beta1.js +++ b/automl/language/sentiment-analysis/deploy-model.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', modelId = 'MODEL_ID' ) { // [START automl_natural_language_sentiment_deploy_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/sentiment-analysis/display-evaluation.v1beta1.js b/automl/language/sentiment-analysis/display-evaluation.v1beta1.js index b8c179ddbe..cad7a19393 100644 --- a/automl/language/sentiment-analysis/display-evaluation.v1beta1.js +++ b/automl/language/sentiment-analysis/display-evaluation.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,9 +20,9 @@ async function main( filter = 'FILTER_EXPRESSION' ) { // [START automl_natural_language_sentiment_display_evaluation] - const automl = require(`@google-cloud/automl`); - const math = require(`mathjs`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const math = require('mathjs'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/sentiment-analysis/export-data.v1beta1.js b/automl/language/sentiment-analysis/export-data.v1beta1.js index f241ce3129..f36ec76f9b 100644 --- a/automl/language/sentiment-analysis/export-data.v1beta1.js +++ b/automl/language/sentiment-analysis/export-data.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,7 +20,7 @@ async function main( gcsOutputUri = '' ) { // [START automl_natural_language_sentiment_export_data] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/sentiment-analysis/get-dataset.v1beta1.js b/automl/language/sentiment-analysis/get-dataset.v1beta1.js index 2850fdbdbe..3d3e61150e 100644 --- a/automl/language/sentiment-analysis/get-dataset.v1beta1.js +++ b/automl/language/sentiment-analysis/get-dataset.v1beta1.js @@ -1,27 +1,26 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', datasetId = 'YOUR_DATASET_ID' ) { // [START automl_natural_language_sentiment_get_dataset] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/sentiment-analysis/get-model-evaluation.v1beta1.js b/automl/language/sentiment-analysis/get-model-evaluation.v1beta1.js index 3a43a9380d..0834dae44b 100644 --- a/automl/language/sentiment-analysis/get-model-evaluation.v1beta1.js +++ b/automl/language/sentiment-analysis/get-model-evaluation.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,9 +20,9 @@ async function main( modelEvaluationId = 'MODEL_EVALUATION_ID' ) { // [START automl_natural_language_sentiment_get_model_evaluation] - const automl = require(`@google-cloud/automl`); - const math = require(`mathjs`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const math = require('mathjs'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/sentiment-analysis/get-model.v1beta1.js b/automl/language/sentiment-analysis/get-model.v1beta1.js index e551dcfd54..2e1a41344c 100644 --- a/automl/language/sentiment-analysis/get-model.v1beta1.js +++ b/automl/language/sentiment-analysis/get-model.v1beta1.js @@ -1,27 +1,26 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', modelId = 'YOUR_MODEL_ID' ) { // [START automl_natural_language_sentiment_get_model] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/sentiment-analysis/get-operation-status.v1beta1.js b/automl/language/sentiment-analysis/get-operation-status.v1beta1.js index 50b15b7b09..bee7c3b60b 100644 --- a/automl/language/sentiment-analysis/get-operation-status.v1beta1.js +++ b/automl/language/sentiment-analysis/get-operation-status.v1beta1.js @@ -1,22 +1,21 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main(operationFullId = 'OPERATION_FULL_ID') { // [START automl_natural_language_sentiment_get_operation_status] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/sentiment-analysis/import-data.v1beta1.js b/automl/language/sentiment-analysis/import-data.v1beta1.js index 51f6f28853..43038e4b61 100644 --- a/automl/language/sentiment-analysis/import-data.v1beta1.js +++ b/automl/language/sentiment-analysis/import-data.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,7 +20,7 @@ async function main( gcsPath = 'YOUR_GCS_PATH' ) { // [START automl_natural_language_sentiment_importData] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/sentiment-analysis/list-datasets.v1beta1.js b/automl/language/sentiment-analysis/list-datasets.v1beta1.js index fea450e8e5..2c01206892 100644 --- a/automl/language/sentiment-analysis/list-datasets.v1beta1.js +++ b/automl/language/sentiment-analysis/list-datasets.v1beta1.js @@ -1,27 +1,26 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', filter = 'YOUR_FILTER_EXPRESSION' ) { // [START automl_natural_language_sentiment_listDatasets] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/sentiment-analysis/list-model-evaluations.v1beta1.js b/automl/language/sentiment-analysis/list-model-evaluations.v1beta1.js index ffd6a3dc6d..24883a9620 100644 --- a/automl/language/sentiment-analysis/list-model-evaluations.v1beta1.js +++ b/automl/language/sentiment-analysis/list-model-evaluations.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,9 +20,9 @@ async function main( filter = 'FILTER_EXPRESSION' ) { // [START automl_natural_language_sentiment_list_model_evaluations] - const automl = require(`@google-cloud/automl`); - const math = require(`mathjs`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const math = require('mathjs'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/sentiment-analysis/list-models.v1beta1.js b/automl/language/sentiment-analysis/list-models.v1beta1.js index 4674adf0ca..cd673d683b 100644 --- a/automl/language/sentiment-analysis/list-models.v1beta1.js +++ b/automl/language/sentiment-analysis/list-models.v1beta1.js @@ -1,27 +1,26 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', filter = 'FILTER_EXPRESSIONS' ) { // [START automl_natural_language_sentiment_list_models] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/sentiment-analysis/list-operation-status.v1beta1.js b/automl/language/sentiment-analysis/list-operation-status.v1beta1.js index e2c29f69ba..c3686bedbd 100644 --- a/automl/language/sentiment-analysis/list-operation-status.v1beta1.js +++ b/automl/language/sentiment-analysis/list-operation-status.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', filter = 'FILTER_EXPRESSIONS' ) { // [START automl_natural_language_sentiment_list_operations_status] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/language/sentiment-analysis/predict.v1beta1.js b/automl/language/sentiment-analysis/predict.v1beta1.js index b0137cf422..5491dccd51 100644 --- a/automl/language/sentiment-analysis/predict.v1beta1.js +++ b/automl/language/sentiment-analysis/predict.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,8 +20,8 @@ async function main( filePath = 'LOCAL_FILE_PATH' ) { // [START automl_natural_language_sentiment_predict] - const automl = require(`@google-cloud/automl`); - const fs = require(`fs`); + const automl = require('@google-cloud/automl'); + const fs = require('fs'); // Create client for prediction service. const client = new automl.v1beta1.PredictionServiceClient(); diff --git a/automl/language/sentiment-analysis/undeploy-model.v1beta1.js b/automl/language/sentiment-analysis/undeploy-model.v1beta1.js index 883e0a9367..c19c89fa1d 100644 --- a/automl/language/sentiment-analysis/undeploy-model.v1beta1.js +++ b/automl/language/sentiment-analysis/undeploy-model.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', modelId = 'MODEL_ID' ) { // [START automl_natural_language_sentiment_undeploy_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/package.json b/automl/package.json index de47ca8f3e..977369c132 100644 --- a/automl/package.json +++ b/automl/package.json @@ -1,7 +1,6 @@ { "name": "@google-cloud/automl-samples", "description": "Samples for the Cloud AutoML Client Library for Node.js.", - "version": "0.0.1", "license": "Apache-2.0", "author": "Google LLC", "engines": { @@ -9,23 +8,21 @@ }, "repository": "googleapis/nodejs-automl", "private": true, - "nyc": { - "exclude": [ - "**/*.test.js" - ] - }, "scripts": { "test": "mocha --timeout 600000" }, + "files": [ + "**/*.js", + "!test/" + ], "dependencies": { "@google-cloud/automl": "^1.9.0", - "chai": "^4.2.0", - "csv": "^5.1.1", - "execa": "^3.0.0", + "csv": "^5.1.3", "mathjs": "^6.0.0", "yargs": "^14.0.0" }, "devDependencies": { - "mocha": "^6.0.1" + "chai": "^4.2.0", + "mocha": "^6.2.2" } } diff --git a/automl/tables/create-dataset.v1beta1.js b/automl/tables/create-dataset.v1beta1.js index 11c65f336d..33264095da 100644 --- a/automl/tables/create-dataset.v1beta1.js +++ b/automl/tables/create-dataset.v1beta1.js @@ -1,27 +1,26 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', datasetName = 'YOUR_DATASET_NAME' ) { // [START automl_tables_create_dataset] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/create-model.v1beta1.js b/automl/tables/create-model.v1beta1.js index daf0d7716d..81930ff481 100644 --- a/automl/tables/create-model.v1beta1.js +++ b/automl/tables/create-model.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -24,7 +23,7 @@ async function main( trainBudget = 'TRAIN_BUDGET' ) { // [START automl_tables_create_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/delete-dataset.v1beta1.js b/automl/tables/delete-dataset.v1beta1.js index 0b6c82998b..8a50b6302a 100644 --- a/automl/tables/delete-dataset.v1beta1.js +++ b/automl/tables/delete-dataset.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', datasetId = 'YOUR_DATASET_ID' ) { // [START automl_tables_delete_dataset] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/delete-model.v1beta1.js b/automl/tables/delete-model.v1beta1.js index c9dd769c19..5fe8130603 100644 --- a/automl/tables/delete-model.v1beta1.js +++ b/automl/tables/delete-model.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', modelId = 'MODEL_ID' ) { // [START automl_tables_delete_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/deploy-model.v1beta1.js b/automl/tables/deploy-model.v1beta1.js index 59eeef1a22..262632b9e9 100644 --- a/automl/tables/deploy-model.v1beta1.js +++ b/automl/tables/deploy-model.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', modelId = 'MODEL_ID' ) { // [START automl_tables_deploy_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/display-evaluation.v1beta1.js b/automl/tables/display-evaluation.v1beta1.js index 179432f595..5d0bc9df8c 100644 --- a/automl/tables/display-evaluation.v1beta1.js +++ b/automl/tables/display-evaluation.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,8 +20,8 @@ async function main( filter = 'FILTER_EXPRESSION' ) { // [START automl_tables_display_evaluation] - const automl = require(`@google-cloud/automl`); - const math = require(`mathjs`); + const automl = require('@google-cloud/automl'); + const math = require('mathjs'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/export-data-to-bigquery.v1beta1.js b/automl/tables/export-data-to-bigquery.v1beta1.js index 0a71527325..1153ca06e3 100644 --- a/automl/tables/export-data-to-bigquery.v1beta1.js +++ b/automl/tables/export-data-to-bigquery.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,7 +20,7 @@ async function main( bigQueryOutputUri = 'BIGQUERY_DIRECTORY' ) { // [START automl_tables_export_data_to_bigquery] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/export-data-to-csv.v1beta1.js b/automl/tables/export-data-to-csv.v1beta1.js index 0bcf4ba71b..c436daa30b 100644 --- a/automl/tables/export-data-to-csv.v1beta1.js +++ b/automl/tables/export-data-to-csv.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,7 +20,7 @@ async function main( gcsOutputUri = 'GCS_DIRECTORY' ) { // [START automl_tables_export_data_to_csv] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/export-evaluated-examples.v1beta1.js b/automl/tables/export-evaluated-examples.v1beta1.js index f12e8220f9..df464a2e9f 100644 --- a/automl/tables/export-evaluated-examples.v1beta1.js +++ b/automl/tables/export-evaluated-examples.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,7 +20,7 @@ async function main( bigQueryOutputUri = 'BIGQUERY_DIRECTORY' ) { // [START automl_tables_export_evaluated_examples] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/get-column-spec.v1beta1.js b/automl/tables/get-column-spec.v1beta1.js index a16d5b72a1..58b0523c37 100644 --- a/automl/tables/get-column-spec.v1beta1.js +++ b/automl/tables/get-column-spec.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -22,7 +21,7 @@ async function main( columnId = 'COLUMN_ID' ) { // [START automl_tables_get_column_spec] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/get-dataset.v1beta1.js b/automl/tables/get-dataset.v1beta1.js index 7d6124ac04..dbf343f016 100644 --- a/automl/tables/get-dataset.v1beta1.js +++ b/automl/tables/get-dataset.v1beta1.js @@ -1,27 +1,26 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', datasetId = 'YOUR_DATASET_ID' ) { // [START automl_tables_get_dataset] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/get-model-evaluation.v1beta1.js b/automl/tables/get-model-evaluation.v1beta1.js index 8ac3078a45..7d34353021 100644 --- a/automl/tables/get-model-evaluation.v1beta1.js +++ b/automl/tables/get-model-evaluation.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,8 +20,8 @@ async function main( modelEvaluationId = 'MODEL_EVALUATION_ID' ) { // [START automl_tables_get_model_evaluation] - const automl = require(`@google-cloud/automl`); - const math = require(`mathjs`); + const automl = require('@google-cloud/automl'); + const math = require('mathjs'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/get-model.v1beta1.js b/automl/tables/get-model.v1beta1.js index 278c2e96ab..d6e532d37a 100644 --- a/automl/tables/get-model.v1beta1.js +++ b/automl/tables/get-model.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', modelId = 'MODEL_ID' ) { // [START automl_tables_get_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/get-operation-status.v1beta1.js b/automl/tables/get-operation-status.v1beta1.js index f2d8efe01c..145e643000 100644 --- a/automl/tables/get-operation-status.v1beta1.js +++ b/automl/tables/get-operation-status.v1beta1.js @@ -1,22 +1,21 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main(operationFullId = 'OPERATION_FULL_ID') { // [START automl_tables_get_operation_status] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/get-table-spec.v1beta1.js b/automl/tables/get-table-spec.v1beta1.js index a158988b19..a54c80fec9 100644 --- a/automl/tables/get-table-spec.v1beta1.js +++ b/automl/tables/get-table-spec.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,7 +20,7 @@ async function main( tableId = 'TABLE_ID' ) { // [START automl_tables_get_table_spec] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/import-data.v1beta1.js b/automl/tables/import-data.v1beta1.js index 109e4d7520..900885be07 100644 --- a/automl/tables/import-data.v1beta1.js +++ b/automl/tables/import-data.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,7 +20,7 @@ async function main( path = 'GCS_PATH or BIGQUERY_PATH' ) { // [START automl_tables_import_data] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/list-column-specs.v1beta1.js b/automl/tables/list-column-specs.v1beta1.js index f505a5ddc1..7f98dec421 100644 --- a/automl/tables/list-column-specs.v1beta1.js +++ b/automl/tables/list-column-specs.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -22,7 +21,7 @@ async function main( filter = 'FILTER_EXPRESSION' ) { // [START automl_tables_list_column_specs] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/list-datasets.v1beta1.js b/automl/tables/list-datasets.v1beta1.js index 582fc2e300..468bdfcef7 100644 --- a/automl/tables/list-datasets.v1beta1.js +++ b/automl/tables/list-datasets.v1beta1.js @@ -1,27 +1,26 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', filter = 'FILTER_EXPRESSION' ) { // [START automl_tables_list_datasets] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/list-model-evaluations.v1beta1.js b/automl/tables/list-model-evaluations.v1beta1.js index 778ca1a6f5..a7e4c9f195 100644 --- a/automl/tables/list-model-evaluations.v1beta1.js +++ b/automl/tables/list-model-evaluations.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,8 +20,8 @@ async function main( filter = 'FILTER_EXPRESSION' ) { // [START automl_tables_list_model_evaluations] - const automl = require(`@google-cloud/automl`); - const math = require(`mathjs`); + const automl = require('@google-cloud/automl'); + const math = require('mathjs'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/list-models.v1beta1.js b/automl/tables/list-models.v1beta1.js index d110abaad9..bd726ab36d 100644 --- a/automl/tables/list-models.v1beta1.js +++ b/automl/tables/list-models.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', filter = 'FILTER_EXPRESSION' ) { // [START automl_tables_list_models] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/list-operation-status.v1beta1.js b/automl/tables/list-operation-status.v1beta1.js index 4def49b6a4..90dd9e251c 100644 --- a/automl/tables/list-operation-status.v1beta1.js +++ b/automl/tables/list-operation-status.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', filter = 'FILTER_EXPRESSION' ) { // [START automl_tables_list_operations_status] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/list-table-specs.v1beta1.js b/automl/tables/list-table-specs.v1beta1.js index 0c2920eca6..440b6f6538 100644 --- a/automl/tables/list-table-specs.v1beta1.js +++ b/automl/tables/list-table-specs.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,7 +20,7 @@ async function main( filter = 'FILTER_EXPRESSION' ) { // [START automl_tables_list_table_specs] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/predict-bq-source-bq-dest.v1beta1.js b/automl/tables/predict-bq-source-bq-dest.v1beta1.js index 3cee0a5fe9..fe00b97a7c 100644 --- a/automl/tables/predict-bq-source-bq-dest.v1beta1.js +++ b/automl/tables/predict-bq-source-bq-dest.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -22,7 +21,7 @@ async function main( outputUri = 'BIGQUERY_DIRECTORY' ) { // [START automl_tables_predict_using_bq_source_and_bq_dest] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); // Create client for prediction service. const client = new automl.v1beta1.PredictionServiceClient(); diff --git a/automl/tables/predict-bq-source-gcs-dest.v1beta1.js b/automl/tables/predict-bq-source-gcs-dest.v1beta1.js index 93ebbc3f26..6a69e60974 100644 --- a/automl/tables/predict-bq-source-gcs-dest.v1beta1.js +++ b/automl/tables/predict-bq-source-gcs-dest.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -22,7 +21,7 @@ async function main( outputUriPrefix = 'GCS_DIRECTORY' ) { // [START automl_tables_predict_using_bq_source_and_gcs_dest] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); // Create client for prediction service. const client = new automl.v1beta1.PredictionServiceClient(); diff --git a/automl/tables/predict-gcs-source-bq-dest.v1beta1.js b/automl/tables/predict-gcs-source-bq-dest.v1beta1.js index 3928507766..27555149b6 100644 --- a/automl/tables/predict-gcs-source-bq-dest.v1beta1.js +++ b/automl/tables/predict-gcs-source-bq-dest.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -22,7 +21,7 @@ async function main( outputUri = 'BIGQUERY_DIRECTORY' ) { // [START automl_tables_predict_using_gcs_source_and_bq_dest] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); // Create client for prediction service. const client = new automl.v1beta1.PredictionServiceClient(); diff --git a/automl/tables/predict-gcs-source-gcs-dest.v1beta1.js b/automl/tables/predict-gcs-source-gcs-dest.v1beta1.js index 24a926fdc6..f3aa304bbc 100644 --- a/automl/tables/predict-gcs-source-gcs-dest.v1beta1.js +++ b/automl/tables/predict-gcs-source-gcs-dest.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -22,7 +21,7 @@ async function main( outputUriPrefix = 'GCS_DIRECTORY' ) { // [START automl_tables_predict_using_gcs_source_and_gcs_dest] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); // Create client for prediction service. const client = new automl.v1beta1.PredictionServiceClient(); diff --git a/automl/tables/predict.v1beta1.js b/automl/tables/predict.v1beta1.js index ebfb70d12f..56d09148c5 100644 --- a/automl/tables/predict.v1beta1.js +++ b/automl/tables/predict.v1beta1.js @@ -1,19 +1,19 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; -`use strict`; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,9 +21,9 @@ async function main( filePath = 'FILE_PATH' ) { // [START automl_tables_predict] - const automl = require(`@google-cloud/automl`); - const fs = require(`fs`); - const csv = require(`csv`); + const automl = require('@google-cloud/automl'); + const fs = require('fs'); + const csv = require('csv'); // Create client for prediction service. const client = new automl.v1beta1.PredictionServiceClient(); diff --git a/automl/tables/undeploy-model.v1beta1.js b/automl/tables/undeploy-model.v1beta1.js index b9243f5715..b7d0d5a5e7 100644 --- a/automl/tables/undeploy-model.v1beta1.js +++ b/automl/tables/undeploy-model.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', modelId = 'MODEL_ID' ) { // [START automl_tables_undeploy_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/update-column-spec.v1beta1.js b/automl/tables/update-column-spec.v1beta1.js index 895bd38aa9..dd73d71976 100644 --- a/automl/tables/update-column-spec.v1beta1.js +++ b/automl/tables/update-column-spec.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -23,7 +22,7 @@ async function main( dataTypeCode = 'DATA_TYPE_CODE' ) { // [START automl_tables_update_column_spec] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/tables/update-dataset.v1beta1.js b/automl/tables/update-dataset.v1beta1.js index 874fe9f4cd..d5fb654513 100644 --- a/automl/tables/update-dataset.v1beta1.js +++ b/automl/tables/update-dataset.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,7 +20,7 @@ async function main( displayName = 'DISPLAY_NAME' ) { // [START automl_tables_update_dataset] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); diff --git a/automl/test/.eslintrc.yml b/automl/test/.eslintrc.yml index e59323a860..aaccebbbe3 100644 --- a/automl/test/.eslintrc.yml +++ b/automl/test/.eslintrc.yml @@ -1,5 +1,5 @@ --- +rules: + no-warning-comments: off env: mocha: true -rules: - no-warning-comments: off \ No newline at end of file diff --git a/automl/test/automlLangaugeSentimentDataSet.v1beta1.test.js b/automl/test/automlLangaugeSentimentDataSet.v1beta1.test.js index f7f30c3cc7..4ef1cf6061 100644 --- a/automl/test/automlLangaugeSentimentDataSet.v1beta1.test.js +++ b/automl/test/automlLangaugeSentimentDataSet.v1beta1.test.js @@ -1,25 +1,23 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. 'use strict'; const {assert} = require('chai'); -const execa = require('execa'); +const {execSync} = require('child_process'); /** Tests for AutoML Natural Language Sentiment Analysis "Dataset API" sample.*/ - const cmdDataset = 'node automlNaturalLanguageSentimentDataset.js'; // TODO(developer): Before running the test cases, @@ -34,12 +32,12 @@ const sentimentMax = 4; const datasetId = 'TST1814315223123098195'; const importDataCsv = 'gs://' + projectId + '-lcm/automl-sentiment/train.csv'; -const exec = async cmd => (await execa.shell(cmd)).stdout; +const exec = cmd => execSync(cmd, {encoding: 'utf8'}); describe.skip('Language Sentiment DatasetAPI', () => { it(`should create, import and delete a dataset`, async () => { // Create dataset - let output = await exec( + let output = exec( `${cmdDataset} create-dataset "${datasetName}" "${sentimentMax}"` ); const parsedOut = output.split('\n'); @@ -47,34 +45,29 @@ describe.skip('Language Sentiment DatasetAPI', () => { assert.match(output, /Dataset display name:/); // Import Data - output = await exec( + output = exec( `${cmdDataset} import-data "${outputDatasetId}" "${importDataCsv}"` ); assert.match(output, /Processing import.../); // Delete dataset - output = await exec(`${cmdDataset} delete-dataset "${outputDatasetId}"`); + output = exec(`${cmdDataset} delete-dataset "${outputDatasetId}"`); assert.match(output, /Dataset delete details:/); }); it(`should list datasets`, async () => { - // List datasets - const output = await exec(`${cmdDataset} list-datasets "${filter}"`); + const output = exec(`${cmdDataset} list-datasets "${filter}"`); assert.match(output, /List of datasets:/); }); it(`should get preexisting dataset`, async () => { - // Get dataset - const output = await exec(`${cmdDataset} get-dataset "${datasetId}"`); + const output = exec(`${cmdDataset} get-dataset "${datasetId}"`); assert.match(output, /Dataset display name:/); }); it(`should export dataset`, async () => { - // Export data const outputUri = 'gs://' + bucket + '/' + datasetId; - const output = await exec( - `${cmdDataset} export-data ${datasetId} ${outputUri}` - ); + const output = exec(`${cmdDataset} export-data ${datasetId} ${outputUri}`); assert.match(output, /Processing export.../); }); }); diff --git a/automl/test/automlLanguageEntityDataSet.v1beta1.test.js b/automl/test/automlLanguageEntityDataSet.v1beta1.test.js index ee7e2f24f7..4bf0b2d3cf 100644 --- a/automl/test/automlLanguageEntityDataSet.v1beta1.test.js +++ b/automl/test/automlLanguageEntityDataSet.v1beta1.test.js @@ -1,22 +1,21 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. 'use strict'; const {assert} = require('chai'); -const execa = require('execa'); +const {execSync} = require('child_process'); /** Tests for AutoML Natural Language Entity Extraction - Dataset Operations */ // TODO(developer): Before running the test cases, @@ -30,12 +29,12 @@ const filter = 'textExtractionDatasetMetadata:*'; const datasetId = 'TEN1866654084614848512'; const importDataCsv = 'gs://cloud-ml-data/NL-entity/dataset.csv'; -const exec = async cmd => (await execa.shell(cmd)).stdout; +const exec = cmd => execSync(cmd, {encoding: 'utf8'}); describe.skip(`Language Entity DatasetAPI`, () => { it(`should create, import and delete a dataset`, async () => { // Create dataset - let output = await exec( + let output = exec( `node create-dataset.v1beta1.js "${projectId}" "${computeRegion}" "${datasetName}"` ); const parsedOut = output.split('\n'); @@ -43,13 +42,13 @@ describe.skip(`Language Entity DatasetAPI`, () => { assert.match(output, /Dataset display name:/); // Import data - output = await exec( + output = exec( `node import-data.v1beta1.js "${projectId}" "${computeRegion}" "${outputDatasetId}" "${importDataCsv}"` ); assert.match(output, /Processing import.../); // Delete dataset - output = await exec( + output = exec( `node delete-dataset.v1beta1.js "${projectId}" "${computeRegion}" "${outputDatasetId}"` ); assert.match(output, /Dataset delete details:/); @@ -57,7 +56,7 @@ describe.skip(`Language Entity DatasetAPI`, () => { it(`should list datasets`, async () => { // List datasets - const output = await exec( + const output = exec( `node list-datasets.v1beta1.js "${projectId}" "${computeRegion}" "${filter}"` ); assert.match(output, /List of datasets:/); @@ -65,7 +64,7 @@ describe.skip(`Language Entity DatasetAPI`, () => { it(`should get preexisting dataset`, async () => { // Get dataset - const output = await exec( + const output = exec( `node get-dataset.v1beta1.js "${projectId}" "${computeRegion}" "${datasetId}"` ); assert.match(output, /Dataset display name:/); @@ -74,7 +73,7 @@ describe.skip(`Language Entity DatasetAPI`, () => { it(`should export dataset`, async () => { // Export data const outputUri = 'gs://' + bucket + '/' + datasetId; - const output = await exec( + const output = exec( `node export-data.v1beta1.js "${projectId}" "${computeRegion}" "${datasetId}" "${outputUri}"` ); assert.match(output, /Processing export../); diff --git a/automl/test/automlLanguageEntityModel.v1beta1.test.js b/automl/test/automlLanguageEntityModel.v1beta1.test.js index 1a3d677b54..e1fb9b1b89 100644 --- a/automl/test/automlLanguageEntityModel.v1beta1.test.js +++ b/automl/test/automlLanguageEntityModel.v1beta1.test.js @@ -1,22 +1,21 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. 'use strict'; const {assert} = require('chai'); -const execa = require('execa'); +const {execSync} = require('child_process'); /** Tests for AutoML Natural Language Entity Extraction "Model API" sample. */ @@ -31,12 +30,12 @@ const testModelName = 'test_entity_model'; const deployModelId = 'TEN8143123852797411328'; const undeployModelId = 'TEN4279035372513525760'; -const exec = async cmd => (await execa.shell(cmd)).stdout; +const exec = cmd => execSync(cmd, {encoding: 'utf8'}); describe.skip(`Language Entity ModelAPI`, () => { it(`should create a model`, async () => { // Create model - let output = await exec( + let output = exec( `node create-model.v1beta1.js "${projectId}" "${computeRegion}" "${datasetId}" "${testModelName}"` ); const operationName = output @@ -47,16 +46,14 @@ describe.skip(`Language Entity ModelAPI`, () => { // Get operation status // Poll operation status, here confirming that operation is not complete yet - output = await exec( - `node get-operation-status.v1beta1.js "${operationName}"` - ); + output = exec(`node get-operation-status.v1beta1.js "${operationName}"`); assert.match(output, /Operation details:/); }); it(`should list models, get and delete a model. list, get and display model evaluations from preexisting models`, async () => { // List models - let output = await exec( + let output = exec( `node list-models.v1beta1.js "${projectId}" "${computeRegion}" "${filter}"` ); const parsedOut = output.split('\n'); @@ -64,11 +61,11 @@ describe.skip(`Language Entity ModelAPI`, () => { assert.match(output, /List of models:/); // Get model - output = await exec(`node get-model.v1beta1.js "${outputModelId}"`); + output = exec(`node get-model.v1beta1.js "${outputModelId}"`); assert.match(output, /Model name:/); // List model evaluations - output = await exec( + output = exec( `node list-model-evaluations.v1beta1.js "${projectId}" "${computeRegion}" "${outputModelId}"` ); const parsedModelEvaluation = output.split('\n'); @@ -76,20 +73,20 @@ describe.skip(`Language Entity ModelAPI`, () => { assert.match(output, /Model evaluation Id:/); // Get model evaluation - output = await exec( + output = exec( `node get-model-evaluation.v1beta1.js "${projectId}" "${computeRegion}" "${outputModelId}" ` + `"${modelEvaluationId}"` ); assert.match(output, /Model evaluation Id:/); // Display evaluation - output = await exec( + output = exec( `node display-evaluation.v1beta1.js "${projectId}" "${computeRegion}" "${outputModelId}"` ); assert.match(output, /Model Evaluation ID:/); // Delete Model - output = await exec( + output = exec( `node delete-model.v1beta1.js "${projectId}" "${computeRegion}" "${outputModelId}"` ); assert.match(output, /Model delete details:/); @@ -97,7 +94,7 @@ describe.skip(`Language Entity ModelAPI`, () => { it(`should list and get operation status`, async () => { // List operation status - let output = await exec( + let output = exec( `node list-operations-status.v1beta1.js "${projectId}" "${computeRegion}"` ); const parsedOut = output.split('\n'); @@ -105,15 +102,13 @@ describe.skip(`Language Entity ModelAPI`, () => { // Get operation status // Poll operation status, here confirming that operation is not complete yet - output = await exec( - `node get-operation-status.v1beta1.js "${operationFullId}"` - ); + output = exec(`node get-operation-status.v1beta1.js "${operationFullId}"`); assert.match(output, /Operation details:/); }); it(`should deploy the model`, async () => { // Deploy the model - const output = await exec( + const output = exec( `node deploy-model.v1beta1.js "${projectId}" "${computeRegion}" "${deployModelId}"` ); assert.match(output, /Name:/); @@ -121,7 +116,7 @@ describe.skip(`Language Entity ModelAPI`, () => { it(`should undeploy the model`, async () => { // Undeploy the model - const output = await exec( + const output = exec( `node undeploy-model.v1beta1.js "${projectId}" "${computeRegion}" "${undeployModelId}"` ); assert.match(output, /Name:/); diff --git a/automl/test/automlLanguageEntityPrediction.v1beta1.test.js b/automl/test/automlLanguageEntityPrediction.v1beta1.test.js index dfa86d8503..8417a6f36b 100644 --- a/automl/test/automlLanguageEntityPrediction.v1beta1.test.js +++ b/automl/test/automlLanguageEntityPrediction.v1beta1.test.js @@ -1,22 +1,21 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. 'use strict'; const {assert} = require('chai'); -const execa = require('execa'); +const {execSync} = require('child_process'); /** Tests for AutoML Natural Language Entity Extraction "Prediction API" sample. */ @@ -31,14 +30,12 @@ const cmdPredict = 'node automlNaturalLanguageEntityPrediction.js'; const modelId = 'TEN5215784095006588928'; const filePath = './resource/entityInput.txt'; -const exec = async cmd => (await execa.shell(cmd)).stdout; +const exec = cmd => execSync(cmd, {encoding: 'utf8'}); describe.skip(`Language Entity PredictionAPI`, () => { it(`should run prediction from preexisting model`, async () => { // Run prediction on 'entityInput.txt' in resource folder - const output = await exec( - `${cmdPredict} predict "${modelId}" "${filePath}"` - ); + const output = exec(`${cmdPredict} predict "${modelId}" "${filePath}"`); assert.match(output, /Predicted text extract entity type:/); }); }); diff --git a/automl/test/automlLanguageSentimentModel.v1beta1.test.js b/automl/test/automlLanguageSentimentModel.v1beta1.test.js index 42279d442c..361ff9396d 100644 --- a/automl/test/automlLanguageSentimentModel.v1beta1.test.js +++ b/automl/test/automlLanguageSentimentModel.v1beta1.test.js @@ -1,22 +1,21 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. 'use strict'; const {assert} = require('chai'); -const execa = require('execa'); +const {execSync} = require('child_process'); /** Tests for AutoML Natural Language Sentiment Analysis "Model API" sample. */ @@ -34,12 +33,12 @@ const testModelName = 'test_sentiment_model'; const deployModelId = 'TST1554691861054799974'; const undeployModelId = 'TST5013860858145102878'; -const exec = async cmd => (await execa.shell(cmd)).stdout; +const exec = cmd => execSync(cmd, {encoding: 'utf8'}); describe.skip('Language Sentiment ModelAPI', () => { it(`should create a model`, async () => { // Create model - let output = await exec( + let output = exec( `${cmdModel} create-model "${datasetId}" "${testModelName}"` ); const operationName = output @@ -50,69 +49,65 @@ describe.skip('Language Sentiment ModelAPI', () => { // Get operation status // Poll operation status, here confirming that operation is not complete yet - output = await exec(`${cmdModel} get-operation-status "${operationName}"`); + output = exec(`${cmdModel} get-operation-status "${operationName}"`); assert.match(output, /Operation details:/); }); it(`should list models, get and delete a model. list, get and display model evaluations from preexisting models`, async () => { // List models - let output = await exec(`${cmdModel} list-models "${filter}"`); + let output = exec(`${cmdModel} list-models "${filter}"`); const parsedOut = output.split('\n'); const outputModelId = parsedOut[3].split(':')[1].trim(); assert.match(output, /List of models:/); // Get Model - output = await exec(`${cmdModel} get-model "${outputModelId}"`); + output = exec(`${cmdModel} get-model "${outputModelId}"`); assert.match(output, /Model name:/); // List model evaluations - output = await exec( - `${cmdModel} list-model-evaluations` + ` "${outputModelId}"` - ); + output = exec(`${cmdModel} list-model-evaluations` + ` "${outputModelId}"`); const parsedModelEvaluation = output.split('\n'); const modelEvaluationId = parsedModelEvaluation[3].split(':')[1].trim(); assert.match(output, /Model evaluation Id:/); // Get model evaluation - output = await exec( + output = exec( `${cmdModel} get-model-evaluation "${outputModelId}"` + ` "${modelEvaluationId}"` ); assert.match(output, /Model evaluation Id:/); // Display evaluation - output = await exec(`${cmdModel} display-evaluation "${outputModelId}"`); + output = exec(`${cmdModel} display-evaluation "${outputModelId}"`); assert.match(output, /Model Evaluation ID:/); // Delete Model - output = await exec(`${cmdModel} delete-model "${outputModelId}"`); + output = exec(`${cmdModel} delete-model "${outputModelId}"`); assert.match(output, /Model delete details:/); }); it(`should deploy the model`, async () => { // Deploy the model - const output = await exec(`${cmdModel} deploy-model ${deployModelId}`); + const output = exec(`${cmdModel} deploy-model ${deployModelId}`); assert.match(output, /Name:/); }); it(`should undeploy the model`, async () => { // Undeploy the model - const output = await exec(`${cmdModel} undeploy-model ${undeployModelId}`); + const output = exec(`${cmdModel} undeploy-model ${undeployModelId}`); assert.match(output, /Name:/); }); it(`should list and get operation status`, async () => { // List operation status - let output = await exec(`${cmdModel} list-operations-status`); + let output = exec(`${cmdModel} list-operations-status`); const parsedOut = output.split('\n'); const operationFullId = parsedOut[3].split(':')[1].trim(); // Get operation status // Poll operation status, here confirming that operation is not complete yet - output = await exec( - `${cmdModel} get-operation-status "${operationFullId}"` - ); + output = exec(`${cmdModel} get-operation-status "${operationFullId}"`); assert.match(output, /Operation details:/); }); }); diff --git a/automl/test/automlLanguageSentimentPrediction.v1beta1.test.js b/automl/test/automlLanguageSentimentPrediction.v1beta1.test.js index 9cfd5092af..14276d0d6b 100644 --- a/automl/test/automlLanguageSentimentPrediction.v1beta1.test.js +++ b/automl/test/automlLanguageSentimentPrediction.v1beta1.test.js @@ -1,22 +1,21 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. 'use strict'; const {assert} = require('chai'); -const execa = require('execa'); +const {execSync} = require('child_process'); /** Tests for AutoML Natural Language Sentiment Analysis "Prediction API" * sample. @@ -32,12 +31,12 @@ const computeRegion = process.env.REGION_NAME; const modelId = 'TST237689009065453820'; const filePath = './resource/sentimentInput.txt'; -const exec = async cmd => (await execa.shell(cmd)).stdout; +const exec = cmd => execSync(cmd, {encoding: 'utf8'}); describe.skip('Language Sentiment PredictionAPI', () => { it(`should run prediction from preexisting model`, async () => { // Run prediction on 'test.txt' in resources folder - const output = await exec( + const output = exec( `${cmdPredict} predict "${projectId}" "${computeRegion}" "${modelId}" "${filePath}"` ); assert.match(output, /Predicted sentiment label:/); diff --git a/automl/test/automlTablesDataset.v1beta1.test.js b/automl/test/automlTablesDataset.v1beta1.test.js index fb15dfc555..6cb89d2a17 100644 --- a/automl/test/automlTablesDataset.v1beta1.test.js +++ b/automl/test/automlTablesDataset.v1beta1.test.js @@ -1,22 +1,21 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. 'use strict'; const {assert} = require('chai'); -const execa = require('execa'); +const {execSync} = require('child_process'); /** Tests for AutoML Tables "Dataset API" sample. */ @@ -38,49 +37,49 @@ const dataTypeCode = 'CATEGORY'; const outputGcsUri = 'gs://automl-tables/export-data/'; const outputBigQueryUri = 'bq://automl-tables-bg-output'; -const exec = async cmd => (await execa.shell(cmd)).stdout; +const exec = cmd => execSync(cmd, {encoding: 'utf8'}); describe('Tables DatasetAPI', () => { it.skip(`should create, import, update and delete a dataset`, async () => { // Create dataset - let output = await exec(`${cmdDataset} create-dataset "${datasetName}"`); + let output = exec(`${cmdDataset} create-dataset "${datasetName}"`); const parsedOut = output.split('\n'); const outputDatasetId = parsedOut[1].split(':')[1].trim(); assert.match(output, /Dataset display name:/); // Import data - output = await exec( + output = exec( `${cmdDataset} import-data "${outputDatasetId}" "${importDataCsv}"` ); assert.match(output, /Processing import.../); // Update dataset - output = await exec( + output = exec( `${cmdDataset} update-dataset "${outputDatasetId}"` + ` "${updateDatasetDisplayName}"` ); assert.match(output, /Dataset Id:/); // Delete dataset - output = await exec(`${cmdDataset} delete-dataset "${outputDatasetId}"`); + output = exec(`${cmdDataset} delete-dataset "${outputDatasetId}"`); assert.match(output, /Dataset delete details:/); }); it.skip(`should list datasets`, async () => { // List dataset - const output = await exec(`${cmdDataset} list-datasets "${filter}"`); + const output = exec(`${cmdDataset} list-datasets "${filter}"`); assert.match(output, /Dataset Id:/); }); it.skip(`should get preexisting dataset`, async () => { // Get dataset - const output = await exec(`${cmdDataset} get-dataset "${datasetId}"`); + const output = exec(`${cmdDataset} get-dataset "${datasetId}"`); assert.match(output, /Dataset Id:/); }); it.skip(`should get,list,update tablespec and columnspec`, async () => { // List table - let output = await exec( + let output = exec( `${cmdDataset} list-table-specs` + ` "${datasetId}" "${filter}"` ); let parsedOut = output.split('\n'); @@ -91,13 +90,13 @@ describe('Tables DatasetAPI', () => { assert.match(output, /Table Id:/); // Get table - output = await exec( + output = exec( `${cmdDataset} get-table-spec` + ` "${datasetId}" "${outputTableId}"` ); assert.match(output, /Table Id:/); // List column - output = await exec( + output = exec( `${cmdDataset} list-column-specs` + ` "${datasetId}" "${outputTableId}"` ); parsedOut = output.split('\n'); @@ -108,14 +107,14 @@ describe('Tables DatasetAPI', () => { assert.match(output, /Column Id:/); // Get column - output = await exec( + output = exec( `${cmdDataset} get-column-spec` + ` "${datasetId}" "${outputTableId}" "${outputColumnId}"` ); assert.match(output, /Column Id:/); // Update column - output = await exec( + output = exec( `${cmdDataset} update-column-spec` + ` "${datasetId}" "${outputTableId}" "${outputColumnId}" "${dataTypeCode}"` ); @@ -124,7 +123,7 @@ describe('Tables DatasetAPI', () => { it.skip(`should export CSV dataset`, async () => { // Export data to csv - const output = await exec( + const output = exec( `${cmdDataset} export-data-to-csv` + ` "${datasetId}" "${outputGcsUri}"` ); assert.match(output, /Processing export.../); @@ -132,7 +131,7 @@ describe('Tables DatasetAPI', () => { it.skip(`should export BigQuery dataset`, async () => { // Export data to bigquery - const output = await exec( + const output = exec( `${cmdDataset} export-data-to-bigquery` + ` "${bigQueryDatasetId}" "${outputBigQueryUri}"` ); diff --git a/automl/test/automlTablesModel.v1beta1.test.js b/automl/test/automlTablesModel.v1beta1.test.js index aca08e6ab3..7a58add5c1 100644 --- a/automl/test/automlTablesModel.v1beta1.test.js +++ b/automl/test/automlTablesModel.v1beta1.test.js @@ -1,22 +1,21 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. 'use strict'; const {assert} = require('chai'); -const execa = require('execa'); +const {execSync} = require('child_process'); /** Tests for AutoML Tables "Model API" sample. */ @@ -37,12 +36,12 @@ const deployModelId = 'TBL4704590352927948800'; const undeployModelId = 'TBL4508824506625687552'; const filter = 'tablesModelMetadata:*'; -const exec = async cmd => (await execa.shell(cmd)).stdout; +const exec = cmd => execSync(cmd, {encoding: 'utf8'}); describe('Tables ModelAPI', () => { it.skip(`should create a model`, async () => { // Create model - let output = await exec( + let output = exec( `${cmdModel} create-model "${datasetId}" "${tableId}" "${columnId}"` + ` "${testModelName}" "${trainBudget}"` ); @@ -52,68 +51,66 @@ describe('Tables ModelAPI', () => { .trim(); assert.match(output, /Training started.../); - output = await exec(`${cmdModel} get-operation-status "${operationName}"`); + output = exec(`${cmdModel} get-operation-status "${operationName}"`); assert.match(output, /Operation details:/); }); it.skip(`should list models, get and delete a model. list, get, export and display model evaluations from preexisting models`, async () => { // List models - let output = await exec(`${cmdModel} list-models "${filter}"`); + let output = exec(`${cmdModel} list-models "${filter}"`); const parsedOut = output.split('\n'); const ouputModelId = parsedOut[3].split(':')[1].trim(); assert.match(output, /List of models:/); // Get model - output = await exec(`${cmdModel} get-model "${ouputModelId}"`); + output = exec(`${cmdModel} get-model "${ouputModelId}"`); assert.match(output, /Model name:/); // List model evaluations - output = await exec(`${cmdModel} list-model-evaluations "${ouputModelId}"`); + output = exec(`${cmdModel} list-model-evaluations "${ouputModelId}"`); const parsedModelEvaluation = output.split('\n'); const modelEvaluationId = parsedModelEvaluation[2].split(':')[1].trim(); assert.match(output, /Model evaluation Id:/); // Get model evaluation - output = await exec( + output = exec( `${cmdModel} get-model-evaluation "${ouputModelId}"` + ` "${modelEvaluationId}"` ); assert.match(output, /Model evaluation Id:/); // Display evaluation - output = await exec(`${cmdModel} display-evaluation "${ouputModelId}"`); + output = exec(`${cmdModel} display-evaluation "${ouputModelId}"`); assert.match(output, /Model Evaluation ID:/); // Export evaluated examples - output = await exec( + output = exec( `${cmdModel} export-evaluated-examples "${ouputModelId}"` + ` "${bqOutputUri}"` ); assert.match(output, /Operation name:/); // Delete model - output = await exec(`${cmdModel} delete-model "${ouputModelId}"`); + output = exec(`${cmdModel} delete-model "${ouputModelId}"`); assert.match(output, /Model delete details:/); }); it.skip(`should deploy the model`, async () => { // Deploy model - const output = await exec(`${cmdModel} deploy-model "${deployModelId}"`); + const output = exec(`${cmdModel} deploy-model "${deployModelId}"`); assert.match(output, /Name:/); }); it.skip(`should undeploy the model`, async () => { // Undeploy model - const output = await exec( - `${cmdModel} undeploy-model "${undeployModelId}"` - ); + const output = exec(`${cmdModel} undeploy-model "${undeployModelId}"`); assert.match(output, /Name:/); }); it.skip(`should list and get operation status`, async () => { // List operations status - let output = await exec(`${cmdModel} list-operations-status `); + let output = exec(`${cmdModel} list-operations-status `); const operationFullId = output .split('\n')[3] .split(':')[1] @@ -122,9 +119,7 @@ describe('Tables ModelAPI', () => { // Get operation status // Poll operation status, here confirming that operation is not complete yet - output = await exec( - `${cmdModel} get-operation-status "${operationFullId}"` - ); + output = exec(`${cmdModel} get-operation-status "${operationFullId}"`); assert.match(output, /Operation details:/); }); }); diff --git a/automl/test/automlTablesPredict.v1beta1.test.js b/automl/test/automlTablesPredict.v1beta1.test.js index 8cf0373e14..11596c1edf 100644 --- a/automl/test/automlTablesPredict.v1beta1.test.js +++ b/automl/test/automlTablesPredict.v1beta1.test.js @@ -1,22 +1,21 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. 'use strict'; const {assert} = require('chai'); -const execa = require('execa'); +const {execSync} = require('child_process'); /** Tests for AutoML Tables "Prediction API" sample. */ @@ -35,21 +34,19 @@ const gcsOutputUriPrefix = 'gs://automl-tables/output'; const bqInputUri = 'bq://automl-tables-bg-input'; const bqOutputUriPrefix = 'bq://automl-tables-bg-output'; -const exec = async cmd => (await execa.shell(cmd)).stdout; +const exec = cmd => execSync(cmd, {encoding: 'utf8'}); describe('Tables PredictionAPI', () => { it.skip(`should perform single prediction`, async () => { // Run single prediction on predictTest.csv in resource folder - const output = await exec( - `${cmdPredict} predict "${modelId}" "${filePath}"` - ); + const output = exec(`${cmdPredict} predict "${modelId}" "${filePath}"`); assert.match(output, /Prediction results:/); }); it.skip(`should perform batch prediction using GCS as source and GCS as destination`, async () => { // Run batch prediction using GCS as source and GCS as destination - const output = await exec( + const output = exec( `${cmdPredict} predict-using-gcs-source-and-gcs-dest "${modelId}"` + ` "${gcsInputUri}" "${gcsOutputUriPrefix}"` ); @@ -59,7 +56,7 @@ describe('Tables PredictionAPI', () => { it.skip(`should perform batch prediction using BQ as source and GCS as destination`, async () => { // Run batch prediction using BQ as source and GCS as destination - const output = await exec( + const output = exec( `${cmdPredict} predict-using-bq-source-and-gcs-dest "${modelId}"` + ` "${bqInputUri}" "${gcsOutputUriPrefix}"` ); @@ -69,7 +66,7 @@ describe('Tables PredictionAPI', () => { it.skip(`should perform batch prediction using GCS as source and BQ as destination`, async () => { // Run batch prediction using GCS as source and BQ as destination - const output = await exec( + const output = exec( `${cmdPredict} predict-using-gcs-source-and-bq-dest "${modelId}"` + ` "${gcsInputUri}" "${bqOutputUriPrefix}"` ); @@ -79,7 +76,7 @@ describe('Tables PredictionAPI', () => { it.skip(`should perform batch prediction using BQ as source and BQ as destination`, async () => { // Run batch prediction using BQ as source and BQ as destination - const output = await exec( + const output = exec( `${cmdPredict} predict-using-bq-source-and-bq-dest "${modelId}"` + ` "${bqInputUri}" "${bqOutputUriPrefix}"` ); diff --git a/automl/test/automlVideoIntelligenceClassificationDataset.v1beta1.test.js b/automl/test/automlVideoIntelligenceClassificationDataset.v1beta1.test.js index aef6ccb483..1848e1d801 100644 --- a/automl/test/automlVideoIntelligenceClassificationDataset.v1beta1.test.js +++ b/automl/test/automlVideoIntelligenceClassificationDataset.v1beta1.test.js @@ -1,22 +1,21 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. 'use strict'; const {assert} = require('chai'); -const execa = require('execa'); +const {execSync} = require('child_process'); /** Tests for AutoML Video Intelligence Classification "Dataset API" sample. */ @@ -33,43 +32,43 @@ const filter = 'videoClassificationDatasetMetadata:*'; const datasetId = 'VCN1802794449273618432'; const importDataCsv = 'gs://automl-video-demo-data/hmdb_split1.csv'; -const exec = async cmd => (await execa.shell(cmd)).stdout; +const exec = cmd => execSync(cmd, {encoding: 'utf8'}); describe.skip(`DatasetAPI`, () => { it(`should create, import and delete a dataset`, async () => { // Create dataset - let output = await exec(`${cmdDataset} create-dataset "${datasetName}"`); + let output = exec(`${cmdDataset} create-dataset "${datasetName}"`); const parsedOut = output.split('\n'); const outputDatasetId = parsedOut[1].split(':')[1].trim(); assert.match(output, /Dataset display name:/); // Import data - output = await exec( + output = exec( `${cmdDataset} import-data "${outputDatasetId}" "${importDataCsv}"` ); assert.match(output, /Processing import.../); // Delete dataset - output = await exec(`${cmdDataset} delete-dataset "${outputDatasetId}"`); + output = exec(`${cmdDataset} delete-dataset "${outputDatasetId}"`); assert.match(output, /Dataset delete details:/); }); it(`should list datasets`, async () => { // List dataset - const output = await exec(`${cmdDataset} list-datasets "${filter}"`); + const output = exec(`${cmdDataset} list-datasets "${filter}"`); assert.match(output, /List of datasets:/); }); it(`should get preexisting dataset`, async () => { // Get dataset - const output = await exec(`${cmdDataset} get-dataset "${datasetId}"`); + const output = exec(`${cmdDataset} get-dataset "${datasetId}"`); assert.match(output, /Dataset display name:/); }); it(`should export dataset`, async () => { // Export data const outputUri = 'gs://' + bucket + '/' + datasetId; - const output = await exec( + const output = exec( `${cmdDataset} export-data "${datasetId}" "${outputUri}"` ); assert.match(output, /Processing export.../); diff --git a/automl/test/automlVideoIntelligenceClassificationModel.v1beta1.test.js b/automl/test/automlVideoIntelligenceClassificationModel.v1beta1.test.js index 86ed0a55c8..f945c4f72d 100644 --- a/automl/test/automlVideoIntelligenceClassificationModel.v1beta1.test.js +++ b/automl/test/automlVideoIntelligenceClassificationModel.v1beta1.test.js @@ -1,22 +1,21 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. 'use strict'; const {assert} = require('chai'); -const execa = require('execa'); +const {execSync} = require('child_process'); /** Tests for AutoML Video Intelligence Classification "Model API" sample. */ @@ -31,12 +30,12 @@ const filter = 'videoClassificationModelMetadata:*'; const datasetId = 'VCN1653190499151904768'; const testModelName = 'test_video_model'; -const exec = async cmd => (await execa.shell(cmd)).stdout; +const exec = cmd => execSync(cmd, {encoding: 'utf8'}); describe.skip(`Video Intelligence ModelAPI`, () => { it(`should create a model`, async () => { // Create model - let output = await exec( + let output = exec( `${cmdModel} create-model "${datasetId}" "${testModelName}"` ); const operationName = output @@ -45,47 +44,47 @@ describe.skip(`Video Intelligence ModelAPI`, () => { .trim(); assert.match(output, /Training started.../); - output = await exec(`${cmdModel} get-operation-status "${operationName}"`); + output = exec(`${cmdModel} get-operation-status "${operationName}"`); assert.match(output, /Operation details:/); }); it(`should list models, get and delete a model. list, get and display model evaluations from preexisting models`, async () => { // List models - let output = await exec(`${cmdModel} list-models "${filter}"`); + let output = exec(`${cmdModel} list-models "${filter}"`); const parsedOut = output.split('\n'); const ouputModelId = parsedOut[3].split(':')[1].trim(); assert.match(output, /List of models:/); // Get model - output = await exec(`${cmdModel} get-model "${ouputModelId}"`); + output = exec(`${cmdModel} get-model "${ouputModelId}"`); assert.match(output, /Model name:/); // List model evaluations - output = await exec(`${cmdModel} list-model-evaluations "${ouputModelId}"`); + output = exec(`${cmdModel} list-model-evaluations "${ouputModelId}"`); const parsedModelEvaluation = output.split('\n'); const modelEvaluationId = parsedModelEvaluation[3].split(':')[1].trim(); assert.match(output, /Model evaluation Id:/); // Get model evaluation - output = await exec( + output = exec( `${cmdModel} get-model-evaluation "${ouputModelId}" ` + `"${modelEvaluationId}"` ); assert.match(output, /Model evaluation Id:/); // Display evaluation - output = await exec(`${cmdModel} display-evaluation "${ouputModelId}"`); + output = exec(`${cmdModel} display-evaluation "${ouputModelId}"`); assert.match(output, /Model Evaluation ID:/); // Delete model - output = await exec(`${cmdModel} delete-model "${ouputModelId}"`); + output = exec(`${cmdModel} delete-model "${ouputModelId}"`); assert.match(output, /Model delete details:/); }); it(`should list and get operation status`, async () => { // List operation status - let output = await exec(`${cmdModel} list-operations-status`); + let output = exec(`${cmdModel} list-operations-status`); const operationFullId = output .split('\n')[3] .split(':')[1] @@ -94,9 +93,7 @@ describe.skip(`Video Intelligence ModelAPI`, () => { // Get operation status // Poll operation status, here confirming that operation is not complete yet - output = await exec( - `${cmdModel} get-operation-status "${operationFullId}"` - ); + output = exec(`${cmdModel} get-operation-status "${operationFullId}"`); assert.match(output, /Operation details:/); }); }); diff --git a/automl/test/automlVideoIntelligenceClassificationPredict.v1beta1.test.js b/automl/test/automlVideoIntelligenceClassificationPredict.v1beta1.test.js index 4613089e8a..04090d18b0 100644 --- a/automl/test/automlVideoIntelligenceClassificationPredict.v1beta1.test.js +++ b/automl/test/automlVideoIntelligenceClassificationPredict.v1beta1.test.js @@ -1,22 +1,21 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. 'use strict'; const {assert} = require('chai'); -const execa = require('execa'); +const {execSync} = require('child_process'); /** Tests for AutoML Video Intelligence Classification "Prediction API" sample. */ @@ -32,12 +31,12 @@ const modelId = 'VCN5018751611309129728'; const inputUri = 'gs://video-intelligence/input-csv/annotateVideo.csv'; const outputUriPrefix = 'gs://video-intelligence/'; -const exec = async cmd => (await execa.shell(cmd)).stdout; +const exec = cmd => execSync(cmd, {encoding: 'utf8'}); describe.skip(`Video Intelligence PredictionAPI`, () => { it(`should run prediction from preexisting model`, async () => { // Run prediction on 'annotate_video.csv' from gcs inputUri - const output = await exec( + const output = exec( `${cmdPredict} predict "${modelId}" "${inputUri}" "${outputUriPrefix}"` ); assert.match(output, /Operation name:/); diff --git a/automl/test/automlVisionObjectDetectionDataset.v1beta1.test.js b/automl/test/automlVisionObjectDetectionDataset.v1beta1.test.js index 2c48487347..7abd3069db 100644 --- a/automl/test/automlVisionObjectDetectionDataset.v1beta1.test.js +++ b/automl/test/automlVisionObjectDetectionDataset.v1beta1.test.js @@ -1,17 +1,16 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. 'use strict'; diff --git a/automl/test/automlVisionObjectDetectionModel.v1beta1.test.js b/automl/test/automlVisionObjectDetectionModel.v1beta1.test.js index 183e1a2dce..ee1edaff83 100644 --- a/automl/test/automlVisionObjectDetectionModel.v1beta1.test.js +++ b/automl/test/automlVisionObjectDetectionModel.v1beta1.test.js @@ -1,17 +1,16 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. 'use strict'; diff --git a/automl/test/automlVisionObjectDetectionPredict.v1beta1.test.js b/automl/test/automlVisionObjectDetectionPredict.v1beta1.test.js index 9953227bb1..6ca7b8ef1c 100644 --- a/automl/test/automlVisionObjectDetectionPredict.v1beta1.test.js +++ b/automl/test/automlVisionObjectDetectionPredict.v1beta1.test.js @@ -1,22 +1,21 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. 'use strict'; const {assert} = require('chai'); -const execa = require('execa'); +const {execSync} = require('child_process'); /** Tests for AutoML Vision Object Detection "Prediction API" sample. */ @@ -27,12 +26,12 @@ const computeRegion = 'us-central1'; const modelId = ''; const filePath = './resource/songbird.jpg'; -const exec = async cmd => (await execa.shell(cmd)).stdout; +const exec = cmd => execSync(cmd, {encoding: 'utf8'}); describe.skip('Vision Object Detection PredictionAPI', () => { it(`should run prediction from preexisting model`, async () => { // Run prediction on 'salad.jpg' in resource folder - const output = await exec( + const output = exec( `node vision/object-detection/predict.v1beta1.js "${projectId}" "${computeRegion}" "${modelId}" "${filePath}"` ); assert.match(output, /Prediction results:/); diff --git a/automl/translate/datasets/create-dataset.v1beta1.js b/automl/translate/datasets/create-dataset.v1beta1.js index 42ebee53e1..9e65a45b80 100644 --- a/automl/translate/datasets/create-dataset.v1beta1.js +++ b/automl/translate/datasets/create-dataset.v1beta1.js @@ -1,23 +1,22 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main(projectId = 'YOUR_PROJECT_ID') { // [START automl_translation_create_dataset] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.AutoMlClient(); const computeRegion = 'us-central1'; diff --git a/automl/translate/datasets/delete-dataset.v1beta1.js b/automl/translate/datasets/delete-dataset.v1beta1.js index 38dc933ef4..fba606f4c7 100644 --- a/automl/translate/datasets/delete-dataset.v1beta1.js +++ b/automl/translate/datasets/delete-dataset.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', @@ -21,7 +20,7 @@ async function main( datasetId = 'YOUR_DATASET' ) { // [START automl_translation_delete_dataset] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.AutoMlClient(); /** diff --git a/automl/translate/datasets/get-dataset.v1beta1.js b/automl/translate/datasets/get-dataset.v1beta1.js index 9d10a96084..279e19d860 100644 --- a/automl/translate/datasets/get-dataset.v1beta1.js +++ b/automl/translate/datasets/get-dataset.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -`use strict`; +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', @@ -21,7 +20,7 @@ async function main( datasetId = 'YOUR_DATASET' ) { // [START automl_translation_get_dataset] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.AutoMlClient(); /** diff --git a/automl/translate/datasets/import-data.v1beta1.js b/automl/translate/datasets/import-data.v1beta1.js index eece7fb9c0..57bd6b1a05 100644 --- a/automl/translate/datasets/import-data.v1beta1.js +++ b/automl/translate/datasets/import-data.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -`use strict`; +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', @@ -22,7 +21,7 @@ async function main( path = 'YOUR_PATH' ) { // [START automl_translation_import_data] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.AutoMlClient(); diff --git a/automl/translate/datasets/list-datasets.v1beta1.js b/automl/translate/datasets/list-datasets.v1beta1.js index 8b1bfd5ddd..781f02e24c 100644 --- a/automl/translate/datasets/list-datasets.v1beta1.js +++ b/automl/translate/datasets/list-datasets.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', @@ -21,7 +20,7 @@ async function main( filter = 'YOUR_FILTER' ) { // [START automl_translation_list_datasets] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.AutoMlClient(); /** diff --git a/automl/translate/models/create-model.v1beta1.js b/automl/translate/models/create-model.v1beta1.js index 2349930c28..41ade8e44e 100644 --- a/automl/translate/models/create-model.v1beta1.js +++ b/automl/translate/models/create-model.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', @@ -22,7 +21,7 @@ async function main( modelName = 'YOUR_MODEL' ) { // [START automl_translation_create_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.AutoMlClient(); diff --git a/automl/translate/models/delete-model.v1beta1.js b/automl/translate/models/delete-model.v1beta1.js index 218569de6c..fdca32314d 100644 --- a/automl/translate/models/delete-model.v1beta1.js +++ b/automl/translate/models/delete-model.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -`use strict`; +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', @@ -21,7 +20,7 @@ async function main( modelId = 'YOUR_MODEL' ) { // [START automl_translation_delete_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.AutoMlClient(); diff --git a/automl/translate/models/get-model-evaluation.v1beta1.js b/automl/translate/models/get-model-evaluation.v1beta1.js index a86c8c292a..d42cc8e163 100644 --- a/automl/translate/models/get-model-evaluation.v1beta1.js +++ b/automl/translate/models/get-model-evaluation.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', @@ -22,7 +21,7 @@ async function main( modelEvaluationId = 'YOUR_EVALUATION_ID' ) { // [START automl_translation_get_model_evaluation] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.AutoMlClient(); /** diff --git a/automl/translate/models/get-model.v1beta1.js b/automl/translate/models/get-model.v1beta1.js index ff86a34523..4678a31581 100644 --- a/automl/translate/models/get-model.v1beta1.js +++ b/automl/translate/models/get-model.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', @@ -21,7 +20,7 @@ async function main( modelId = 'YOUR_MODEL' ) { // [START automl_translation_get_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.AutoMlClient(); diff --git a/automl/translate/models/get-operation-status.v1beta1.js b/automl/translate/models/get-operation-status.v1beta1.js index f3c1d24d44..23c04f458d 100644 --- a/automl/translate/models/get-operation-status.v1beta1.js +++ b/automl/translate/models/get-operation-status.v1beta1.js @@ -1,23 +1,22 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main(operationFullId = 'YOUR_OPERATION_ID') { // [START automl_translation_get_operation_status] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.AutoMlClient(); diff --git a/automl/translate/models/list-model-evaluations.v1beta1.js b/automl/translate/models/list-model-evaluations.v1beta1.js index 17e693016f..5338703aa1 100644 --- a/automl/translate/models/list-model-evaluations.v1beta1.js +++ b/automl/translate/models/list-model-evaluations.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -`use strict`; +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', @@ -22,7 +21,7 @@ async function main( filter = 'YOUR_FILTER' ) { // [START automl_translation_list_model_evaluations] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.AutoMlClient(); diff --git a/automl/translate/models/list-models.v1beta1.js b/automl/translate/models/list-models.v1beta1.js index af7671021c..a7eea18079 100644 --- a/automl/translate/models/list-models.v1beta1.js +++ b/automl/translate/models/list-models.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -`use strict`; +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', @@ -21,7 +20,7 @@ async function main( filter = 'YOUR_FILTER' ) { // [START automl_translation_list_models] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.AutoMlClient(); diff --git a/automl/translate/prediction/predict.v1beta1.js b/automl/translate/prediction/predict.v1beta1.js index 05cdc3be70..a101a94701 100644 --- a/automl/translate/prediction/predict.v1beta1.js +++ b/automl/translate/prediction/predict.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', @@ -23,8 +22,8 @@ async function main( translationAllowFallback = false ) { // [START automl_translation_predict] - const automl = require(`@google-cloud/automl`); - const fs = require(`fs`); + const automl = require('@google-cloud/automl'); + const fs = require('fs'); // Create client for prediction service. const client = new automl.PredictionServiceClient(); diff --git a/automl/video-intelligence/classification/create-dataset.v1beta1.js b/automl/video-intelligence/classification/create-dataset.v1beta1.js index 39f2be02d9..4da80f89bf 100644 --- a/automl/video-intelligence/classification/create-dataset.v1beta1.js +++ b/automl/video-intelligence/classification/create-dataset.v1beta1.js @@ -1,27 +1,26 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', datasetName = 'YOUR_DATASET_NAME' ) { // [START automl_video_intelligence_classification_create_dataset] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/video-intelligence/classification/create-model.v1beta1.js b/automl/video-intelligence/classification/create-model.v1beta1.js index d43811b345..644a286c7c 100644 --- a/automl/video-intelligence/classification/create-model.v1beta1.js +++ b/automl/video-intelligence/classification/create-model.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,7 +20,7 @@ async function main( modelName = 'MODEL_NAME' ) { // [START automl_video_intelligence_classification_create_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/video-intelligence/classification/delete-dataset.v1beta1.js b/automl/video-intelligence/classification/delete-dataset.v1beta1.js index 43b13a10fb..2ac41996ae 100644 --- a/automl/video-intelligence/classification/delete-dataset.v1beta1.js +++ b/automl/video-intelligence/classification/delete-dataset.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', datasetId = 'YOUR_DATASET_ID' ) { // [START automl_video_intelligence_classification_delete_dataset] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/video-intelligence/classification/delete-model.v1beta1.js b/automl/video-intelligence/classification/delete-model.v1beta1.js index 59eed47187..40e799ef7e 100644 --- a/automl/video-intelligence/classification/delete-model.v1beta1.js +++ b/automl/video-intelligence/classification/delete-model.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', modelId = 'MODEL_ID' ) { // [START automl_video_intelligence_classification_delete_model] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/video-intelligence/classification/display-evaluation.v1beta1.js b/automl/video-intelligence/classification/display-evaluation.v1beta1.js index fdccb56ffe..e254f10b72 100644 --- a/automl/video-intelligence/classification/display-evaluation.v1beta1.js +++ b/automl/video-intelligence/classification/display-evaluation.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,8 +20,8 @@ async function main( filter = 'FILTER_EXPRESSION' ) { // [START automl_video_intelligence_classification_display_evaluation] - const automl = require(`@google-cloud/automl`); - const math = require(`mathjs`); + const automl = require('@google-cloud/automl'); + const math = require('mathjs'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/video-intelligence/classification/export-data.v1beta1.js b/automl/video-intelligence/classification/export-data.v1beta1.js index 418c2bc387..5d182e86ba 100644 --- a/automl/video-intelligence/classification/export-data.v1beta1.js +++ b/automl/video-intelligence/classification/export-data.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,7 +20,7 @@ async function main( gcsOutputUri = 'GCS_DIRECTORY' ) { // [START automl_video_intelligence_classification_export_data] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/video-intelligence/classification/get-dataset.v1beta1.js b/automl/video-intelligence/classification/get-dataset.v1beta1.js index 04b2b54162..8380b2202c 100644 --- a/automl/video-intelligence/classification/get-dataset.v1beta1.js +++ b/automl/video-intelligence/classification/get-dataset.v1beta1.js @@ -1,27 +1,26 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', datasetId = 'YOUR_DATASET_ID' ) { // [START automl_video_intelligence_classification_get_dataset] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/video-intelligence/classification/get-model-evaluations.v1beta1.js b/automl/video-intelligence/classification/get-model-evaluations.v1beta1.js index d8cbefa104..65227f87ed 100644 --- a/automl/video-intelligence/classification/get-model-evaluations.v1beta1.js +++ b/automl/video-intelligence/classification/get-model-evaluations.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,8 +20,8 @@ async function main( modelEvaluationId = 'MODEL_EVALUATION_ID' ) { // [START automl_video_intelligence_classification_get_model_evaluation] - const automl = require(`@google-cloud/automl`); - const math = require(`mathjs`); + const automl = require('@google-cloud/automl'); + const math = require('mathjs'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/video-intelligence/classification/get-model.v1beta1.js b/automl/video-intelligence/classification/get-model.v1beta1.js index e88e179a57..45fb54ac63 100644 --- a/automl/video-intelligence/classification/get-model.v1beta1.js +++ b/automl/video-intelligence/classification/get-model.v1beta1.js @@ -1,27 +1,26 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', modelId = 'MODEL_ID' ) { // [START automl_video_intelligence_classification_get_model] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/video-intelligence/classification/get-operation-status.v1beta1.js b/automl/video-intelligence/classification/get-operation-status.v1beta1.js index bc994be285..c4ff019cdc 100644 --- a/automl/video-intelligence/classification/get-operation-status.v1beta1.js +++ b/automl/video-intelligence/classification/get-operation-status.v1beta1.js @@ -1,22 +1,21 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main(operationFullId = 'OPERATION_FULL_ID') { // [START automl_video_intelligence_classification_get_operation_status] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/video-intelligence/classification/import-data.v1beta1.js b/automl/video-intelligence/classification/import-data.v1beta1.js index 1a4eefd418..1d85baadf4 100644 --- a/automl/video-intelligence/classification/import-data.v1beta1.js +++ b/automl/video-intelligence/classification/import-data.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,7 +20,7 @@ async function main( gcsPath = 'GCS_PATH' ) { // [START automl_video_intelligence_classification_import_data] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/video-intelligence/classification/list-datasets.v1beta1.js b/automl/video-intelligence/classification/list-datasets.v1beta1.js index fb15f2a096..d51b6bd4a0 100644 --- a/automl/video-intelligence/classification/list-datasets.v1beta1.js +++ b/automl/video-intelligence/classification/list-datasets.v1beta1.js @@ -1,27 +1,26 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', filter = 'FILTER_EXPRESSION' ) { // [START automl_video_intelligence_classification_list_datasets] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/video-intelligence/classification/list-model-evaluations.v1beta1.js b/automl/video-intelligence/classification/list-model-evaluations.v1beta1.js index f95cf5cafd..fcea6951c9 100644 --- a/automl/video-intelligence/classification/list-model-evaluations.v1beta1.js +++ b/automl/video-intelligence/classification/list-model-evaluations.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -21,8 +20,8 @@ async function main( filter = 'FILTER_EXPRESSION' ) { // [START automl_video_intelligence_classification_list_model_evaluations] - const automl = require(`@google-cloud/automl`); - const math = require(`mathjs`); + const automl = require('@google-cloud/automl'); + const math = require('mathjs'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/video-intelligence/classification/list-models.v1beta1.js b/automl/video-intelligence/classification/list-models.v1beta1.js index c86698708e..ca6262f86a 100644 --- a/automl/video-intelligence/classification/list-models.v1beta1.js +++ b/automl/video-intelligence/classification/list-models.v1beta1.js @@ -1,27 +1,26 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', filter = 'FILTER_EXPRESSION' ) { // [START automl_video_intelligence_classification_list_models] - const automl = require(`@google-cloud/automl`); - const util = require(`util`); + const automl = require('@google-cloud/automl'); + const util = require('util'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/video-intelligence/classification/list-operation-status.v1beta1.js b/automl/video-intelligence/classification/list-operation-status.v1beta1.js index f293bc80e0..3549e92dfc 100644 --- a/automl/video-intelligence/classification/list-operation-status.v1beta1.js +++ b/automl/video-intelligence/classification/list-operation-status.v1beta1.js @@ -1,26 +1,25 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', filter = 'FILTER_EXPRESSION' ) { // [START automl_video_intelligence_classification_list_operations_status] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); /** diff --git a/automl/video-intelligence/classification/predict.v1beta1.js b/automl/video-intelligence/classification/predict.v1beta1.js index 1cd204073c..94c46df34f 100644 --- a/automl/video-intelligence/classification/predict.v1beta1.js +++ b/automl/video-intelligence/classification/predict.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; async function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -22,7 +21,7 @@ async function main( outputUriPrefix = 'GCS_DIRECTORY_PATH' ) { // [START automl_video_intelligence_classification_predict] - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); // Create client for prediction service. const client = new automl.v1beta1.PredictionServiceClient(); diff --git a/automl/vision/automlVisionDataset.js b/automl/vision/automlVisionDataset.js index aec1b6dbc8..055a69367e 100644 --- a/automl/vision/automlVisionDataset.js +++ b/automl/vision/automlVisionDataset.js @@ -20,7 +20,7 @@ * https://cloud.google.com/vision/automl/docs/ */ -`use strict`; +'use strict'; function createDataset(projectId, computeRegion, datasetName, multiLabel) { // [START automl_vision_create_dataset] diff --git a/automl/vision/automlVisionModel.js b/automl/vision/automlVisionModel.js index ff04194f93..9764321d99 100644 --- a/automl/vision/automlVisionModel.js +++ b/automl/vision/automlVisionModel.js @@ -20,7 +20,7 @@ * https://cloud.google.com/vision/automl/docs/ */ -`use strict`; +'use strict'; function createModel( projectId, @@ -118,7 +118,7 @@ function getOperationStatus(operationFullId) { function listModels(projectId, computeRegion, filter) { // [START automl_vision_list_models] async function automlVisinListModels() { - const automl = require(`@google-cloud/automl`); + const automl = require('@google-cloud/automl'); const client = new automl.v1beta1.AutoMlClient(); @@ -261,7 +261,7 @@ function listModelEvaluations(projectId, computeRegion, modelId, filter) { // [START automl_vision_list_model_evaluations] async function automlVisionListModelEvalution() { const automl = require(`@google-cloud/automl`).v1beta1; - const util = require(`util`); + const util = require('util'); const client = new automl.AutoMlClient(); /** @@ -297,7 +297,7 @@ async function getModelEvaluation( ) { // [START automl_vision_get_model_evaluation] const automl = require(`@google-cloud/automl`).v1beta1; - const util = require(`util`); + const util = require('util'); const client = new automl.AutoMlClient(); @@ -329,7 +329,7 @@ function displayEvaluation(projectId, computeRegion, modelId, filter) { // [START automl_vision_display_evaluation] async function automlVisionDisplayEvalution() { const automl = require(`@google-cloud/automl`).v1beta1; - const math = require(`mathjs`); + const math = require('mathjs'); const client = new automl.AutoMlClient(); diff --git a/automl/vision/object-detection/create-dataset.v1beta1.js b/automl/vision/object-detection/create-dataset.v1beta1.js index 1e15b9737d..32d09a4a2c 100644 --- a/automl/vision/object-detection/create-dataset.v1beta1.js +++ b/automl/vision/object-detection/create-dataset.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -33,7 +32,7 @@ function main( // Instantiates a client const automlClient = new AutoMlClient(); - const util = require(`util`); + const util = require('util'); async function createDataset() { // A resource that represents Google Cloud Platform location. diff --git a/automl/vision/object-detection/create-model.v1beta1.js b/automl/vision/object-detection/create-model.v1beta1.js index 4b2198f0bd..55caa4edce 100644 --- a/automl/vision/object-detection/create-model.v1beta1.js +++ b/automl/vision/object-detection/create-model.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', diff --git a/automl/vision/object-detection/delete-dataset.v1beta1.js b/automl/vision/object-detection/delete-dataset.v1beta1.js index cd65f170e9..bc5b18910a 100644 --- a/automl/vision/object-detection/delete-dataset.v1beta1.js +++ b/automl/vision/object-detection/delete-dataset.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', diff --git a/automl/vision/object-detection/delete-model.v1beta1.js b/automl/vision/object-detection/delete-model.v1beta1.js index 73a7e2f3a7..100efe5cd9 100644 --- a/automl/vision/object-detection/delete-model.v1beta1.js +++ b/automl/vision/object-detection/delete-model.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', diff --git a/automl/vision/object-detection/deploy-model.v1beta1.js b/automl/vision/object-detection/deploy-model.v1beta1.js index 803e39f833..ba3271961e 100644 --- a/automl/vision/object-detection/deploy-model.v1beta1.js +++ b/automl/vision/object-detection/deploy-model.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', diff --git a/automl/vision/object-detection/display-evaluation.v1beta1.js b/automl/vision/object-detection/display-evaluation.v1beta1.js index 838aeb8df8..36da1cb0d4 100644 --- a/automl/vision/object-detection/display-evaluation.v1beta1.js +++ b/automl/vision/object-detection/display-evaluation.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -31,7 +30,7 @@ function main( // const filter = '[FILTER_EXPRESSIONS]' // e.g., "imageObjectDetectionModelMetadata:*"; - const math = require(`mathjs`); + const math = require('mathjs'); //Imports the Google Cloud Automl library const {AutoMlClient} = require('@google-cloud/automl').v1beta1; diff --git a/automl/vision/object-detection/export-data.v1beta1.js b/automl/vision/object-detection/export-data.v1beta1.js index e5d3b190b5..a7a7efaffe 100644 --- a/automl/vision/object-detection/export-data.v1beta1.js +++ b/automl/vision/object-detection/export-data.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', diff --git a/automl/vision/object-detection/get-dataset.v1beta1.js b/automl/vision/object-detection/get-dataset.v1beta1.js index 99c9d587e2..5676c7d2f0 100644 --- a/automl/vision/object-detection/get-dataset.v1beta1.js +++ b/automl/vision/object-detection/get-dataset.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -33,7 +32,7 @@ function main( // Instantiates a client const automlClient = new AutoMlClient(); - const util = require(`util`); + const util = require('util'); async function getDataset() { // Get the full path of the dataset. const datasetFullId = automlClient.datasetPath( diff --git a/automl/vision/object-detection/get-model-evaluations.v1beta1.js b/automl/vision/object-detection/get-model-evaluations.v1beta1.js index f5f42e65f6..80fa52945b 100644 --- a/automl/vision/object-detection/get-model-evaluations.v1beta1.js +++ b/automl/vision/object-detection/get-model-evaluations.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -37,7 +36,7 @@ function main( // Instantiates a client const automlClient = new AutoMlClient(); - const math = require(`mathjs`); + const math = require('mathjs'); async function getModelEvaluations() { // Get the full path of the model evaluation. diff --git a/automl/vision/object-detection/get-model.v1beta1.js b/automl/vision/object-detection/get-model.v1beta1.js index e258b99f83..204bf35b73 100644 --- a/automl/vision/object-detection/get-model.v1beta1.js +++ b/automl/vision/object-detection/get-model.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', diff --git a/automl/vision/object-detection/get-operation-status.v1beta1.js b/automl/vision/object-detection/get-operation-status.v1beta1.js index 571f0eb936..ec5dc0cfa6 100644 --- a/automl/vision/object-detection/get-operation-status.v1beta1.js +++ b/automl/vision/object-detection/get-operation-status.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main(operationFullId = 'OPERATION_FULL_ID') { // [START automl_vision_object_detection_get_operation_status] /** diff --git a/automl/vision/object-detection/import-data.v1beta1.js b/automl/vision/object-detection/import-data.v1beta1.js index d607f01bbd..28f69941ba 100644 --- a/automl/vision/object-detection/import-data.v1beta1.js +++ b/automl/vision/object-detection/import-data.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', diff --git a/automl/vision/object-detection/list-datasets.v1beta1.js b/automl/vision/object-detection/list-datasets.v1beta1.js index b9eecc2ae1..703dbd292e 100644 --- a/automl/vision/object-detection/list-datasets.v1beta1.js +++ b/automl/vision/object-detection/list-datasets.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -34,7 +33,7 @@ function main( // Instantiates a client const automlClient = new AutoMlClient(); - const util = require(`util`); + const util = require('util'); async function listDatasets() { const projectLocation = automlClient.locationPath(projectId, computeRegion); diff --git a/automl/vision/object-detection/list-model-evaluations.v1beta1.js b/automl/vision/object-detection/list-model-evaluations.v1beta1.js index 6dc1aa685e..a84f98ce47 100644 --- a/automl/vision/object-detection/list-model-evaluations.v1beta1.js +++ b/automl/vision/object-detection/list-model-evaluations.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -31,7 +30,7 @@ function main( // const filter_ = '[FILTER_EXPRESSIONS]' // e.g., "imageObjectDetectionModelMetadata:*"; - const math = require(`mathjs`); + const math = require('mathjs'); //Imports the Google Cloud Automl library const {AutoMlClient} = require('@google-cloud/automl').v1beta1; diff --git a/automl/vision/object-detection/list-models.v1beta1.js b/automl/vision/object-detection/list-models.v1beta1.js index 262fe2c8cb..7af2490777 100644 --- a/automl/vision/object-detection/list-models.v1beta1.js +++ b/automl/vision/object-detection/list-models.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', diff --git a/automl/vision/object-detection/list-operation-status.v1beta1.js b/automl/vision/object-detection/list-operation-status.v1beta1.js index a7f3719f06..36e5de9701 100644 --- a/automl/vision/object-detection/list-operation-status.v1beta1.js +++ b/automl/vision/object-detection/list-operation-status.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', diff --git a/automl/vision/object-detection/predict.v1beta1.js b/automl/vision/object-detection/predict.v1beta1.js index 040a002bbf..6c02c1b8a7 100644 --- a/automl/vision/object-detection/predict.v1beta1.js +++ b/automl/vision/object-detection/predict.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME', @@ -41,7 +40,7 @@ function main( // Instantiates a client const predictionServiceClient = new PredictionServiceClient(); - const fs = require(`fs`); + const fs = require('fs'); async function predict() { // Get the full path of the model. diff --git a/automl/vision/object-detection/undeploy-model.v1beta1.js b/automl/vision/object-detection/undeploy-model.v1beta1.js index e3eba9c92b..a1facb250c 100644 --- a/automl/vision/object-detection/undeploy-model.v1beta1.js +++ b/automl/vision/object-detection/undeploy-model.v1beta1.js @@ -1,19 +1,18 @@ -/** - * Copyright 2019, Google LLC - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2019 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -`use strict`; +'use strict'; function main( projectId = 'YOUR_PROJECT_ID', computeRegion = 'YOUR_REGION_NAME',