diff --git a/packages/google-cloud-translate/.cloud-repo-tools.json b/packages/google-cloud-translate/.cloud-repo-tools.json deleted file mode 100644 index 65049e6bfe3..00000000000 --- a/packages/google-cloud-translate/.cloud-repo-tools.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "requiresKeyFile": true, - "requiresProjectId": true, - "product": "translate", - "client_reference_url": "https://cloud.google.com/nodejs/docs/reference/translate/latest/", - "release_quality": "ga", - "samples": [ - { - "id": "translate", - "name": "Translate", - "file": "translate.js", - "docs_link": "https://cloud.google.com/translate/docs", - "usage": "node translate.js --help" - } - ] -} diff --git a/packages/google-cloud-translate/.readme-partials.yml b/packages/google-cloud-translate/.readme-partials.yml new file mode 100644 index 00000000000..d4a8fcfe5d5 --- /dev/null +++ b/packages/google-cloud-translate/.readme-partials.yml @@ -0,0 +1,62 @@ +title: |- + The [Cloud Translation API](https://cloud.google.com/translate/docs/), + can dynamically translate text between thousands + of language pairs. The Cloud Translation API lets websites and programs + integrate with the translation service programmatically. The Cloud Translation + API is part of the larger Cloud Machine Learning API family. +samples_body: |- + ### Translate V3 Beta Samples + + #### Install Dependencies + + From the [root directory](https://github.com/googleapis/nodejs-translate) of the client library install the dependencies: + + ``` + npm install + ``` + + Change to the samples directory, link the google-cloud/translate library from the parent, and install its dependencies: + + ``` + cd samples/ + npm link ../ + npm install + ``` + + #### Run the Tests + + To run the tests for the entire sample, run + + ``` + npm test + ``` + + To run the tests for only the translate v3 samples, run + + ``` + npm run test-v3 + ``` + + To run the tests for a single translate v3 sample, run this command, substituting FILE_NAME with the name of a valid test file. + + ``` + ./node_modules/.bin/mocha test/v3beta1/FILE_NAME + ``` + + For example, to test the `translate_list_language_names_beta` sample, the command would be + + ``` + ./node_modules/.bin/mocha test/v3beta1/translate_list_language_names_beta.test.js + ``` + + To run a sample directly, call the file with the `node` command and any required CLI arguments: + + ``` + node v3beta1/FILE_NAME + ``` + + For example, to run the `translate_list_codes_beta` sample, you would run the following command, substituting your project ID in place of "your_project_id" + + ``` + node v3beta1/translate_list_codes_beta.js "your_project_id" + ``` diff --git a/packages/google-cloud-translate/.repo-metadata.json b/packages/google-cloud-translate/.repo-metadata.json new file mode 100644 index 00000000000..75cc91f75b7 --- /dev/null +++ b/packages/google-cloud-translate/.repo-metadata.json @@ -0,0 +1,13 @@ +{ + "name": "translate", + "name_pretty": "Cloud Translation", + "product_documentation": "https://cloud.google.com/translate/docs/", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/translate/latest/", + "issue_tracker": "https://issuetracker.google.com/savedsearches/559749", + "release_level": "ga", + "language": "nodejs", + "repo": "googleapis/nodejs-translate", + "distribution_name": "@google-cloud/translate", + "api_id": "translate.googleapis.com", + "requires_billing": true +} diff --git a/packages/google-cloud-translate/README.md b/packages/google-cloud-translate/README.md index 3f052306120..c6db274ae3f 100644 --- a/packages/google-cloud-translate/README.md +++ b/packages/google-cloud-translate/README.md @@ -1,70 +1,90 @@ [//]: # "This README.md file is auto-generated, all changes to this file will be lost." -[//]: # "To regenerate it, use `npm run generate-scaffolding`." +[//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# [Google Cloud Translation API: Node.js Client](https://github.com/googleapis/nodejs-translate) +The [Cloud Translation API](https://cloud.google.com/translate/docs/), +can dynamically translate text between thousands +of language pairs. The Cloud Translation API lets websites and programs +integrate with the translation service programmatically. The Cloud Translation +API is part of the larger Cloud Machine Learning API family. -[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) + +[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) [![npm version](https://img.shields.io/npm/v/@google-cloud/translate.svg)](https://www.npmjs.org/package/@google-cloud/translate) [![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-translate/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-translate) -The [Cloud Translation API](https://cloud.google.com/translate/docs), can dynamically translate text between thousands of language pairs. The Cloud Translation API lets websites and programs integrate with the translation service programmatically. The Cloud Translation API is part of the larger Cloud Machine Learning API family. -* [Using the client library](#using-the-client-library) + +Cloud Translation API Client Library for Node.js + + +* [Cloud Translation Node.js Client API Reference][client-docs] +* [Cloud Translation Documentation][product-docs] +* [github.com/googleapis/nodejs-translate](https://github.com/googleapis/nodejs-translate) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + * [Using the client library](#using-the-client-library) * [Samples](#samples) * [Versioning](#versioning) * [Contributing](#contributing) * [License](#license) -## Using the client library +## Quickstart -1. [Select or create a Cloud Platform project][projects]. +### Before you begin +1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. - -1. [Enable the Google Cloud Translation API API][enable_api]. - +1. [Enable the Cloud Translation API][enable_api]. 1. [Set up authentication with a service account][auth] so you can access the API from your local workstation. -1. Install the client library: +### Installing the client library + +```bash +npm install @google-cloud/translate +``` - npm install --save @google-cloud/translate -1. Try an example: +### Using the client library ```javascript -// Imports the Google Cloud client library -const {Translate} = require('@google-cloud/translate'); - -// Your Google Cloud Platform project ID -const projectId = 'YOUR_PROJECT_ID'; - -// Instantiates a client -const translate = new Translate({ - projectId: projectId, -}); - -// The text to translate -const text = 'Hello, world!'; -// The target language -const target = 'ru'; - -// Translates some text into Russian -translate - .translate(text, target) - .then(results => { - const translation = results[0]; - - console.log(`Text: ${text}`); - console.log(`Translation: ${translation}`); - }) - .catch(err => { - console.error('ERROR:', err); - }); +async function main( + projectId = 'YOUR_PROJECT_ID' // Your GCP Project Id +) { + // Imports the Google Cloud client library + const {Translate} = require('@google-cloud/translate'); + + // Instantiates a client + const translate = new Translate({projectId}); + + // The text to translate + const text = 'Hello, world!'; + + // The target language + const target = 'ru'; + + // Translates some text into Russian + const [translation] = await translate.translate(text, target); + console.log(`Text: ${text}`); + console.log(`Translation: ${translation}`); +} + ``` + + ## Samples Samples are in the [`samples/`](https://github.com/googleapis/nodejs-translate/tree/master/samples) directory. The samples' `README.md` @@ -72,21 +92,29 @@ has instructions for running the samples. | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Quickstart | [source code](https://github.com/googleapis/nodejs-translate/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | | Translate | [source code](https://github.com/googleapis/nodejs-translate/blob/master/samples/translate.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/translate.js,samples/README.md) | -The [Cloud Translation API Node.js Client API Reference][client-docs] documentation + + +The [Cloud Translation Node.js Client API Reference][client-docs] documentation also contains samples. ## Versioning This library follows [Semantic Versioning](http://semver.org/). + This library is considered to be **General Availability (GA)**. This means it is stable; the code surface will not change in backwards-incompatible ways unless absolutely necessary (e.g. because of critical security issues) or with an extensive deprecation period. Issues and requests against **GA** libraries are addressed with the highest priority. + + + + More Information: [Google Cloud Platform Launch Stages][launch_stages] [launch_stages]: https://cloud.google.com/terms/launch-stages @@ -101,22 +129,10 @@ Apache Version 2.0 See [LICENSE](https://github.com/googleapis/nodejs-translate/blob/master/LICENSE) -## What's Next - -* [Cloud Translation API Documentation][product-docs] -* [Cloud Translation API Node.js Client API Reference][client-docs] -* [github.com/googleapis/nodejs-translate](https://github.com/googleapis/nodejs-translate) - -Read more about the client libraries for Cloud APIs, including the older -Google APIs Client Libraries, in [Client Libraries Explained][explained]. - -[explained]: https://cloud.google.com/apis/docs/client-libraries-explained - [client-docs]: https://cloud.google.com/nodejs/docs/reference/translate/latest/ -[product-docs]: https://cloud.google.com/translate/docs +[product-docs]: https://cloud.google.com/translate/docs/ [shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [projects]: https://console.cloud.google.com/project [billing]: https://support.google.com/cloud/answer/6293499#enable-billing [enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=translate.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started - +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-cloud-translate/package.json b/packages/google-cloud-translate/package.json index 584677417ca..5e02b50d4cd 100644 --- a/packages/google-cloud-translate/package.json +++ b/packages/google-cloud-translate/package.json @@ -30,7 +30,6 @@ "scripts": { "docs": "jsdoc -c .jsdoc.js", "predocs": "npm run compile", - "generate-scaffolding": "repo-tools generate all && repo-tools generate lib_samples_readme -l samples/ --config ../.cloud-repo-tools.json", "lint": "npm run check && eslint '**/*.js'", "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", "system-test": "mocha build/system-test --timeout 600000", @@ -59,7 +58,6 @@ "teeny-request": "^3.4.0" }, "devDependencies": { - "@google-cloud/nodejs-repo-tools": "^3.2.0", "@types/extend": "^3.0.0", "@types/is": "0.0.21", "@types/mocha": "^5.2.4", diff --git a/packages/google-cloud-translate/samples/README.md b/packages/google-cloud-translate/samples/README.md index ed53c6a4f61..c9c9e8da2c2 100644 --- a/packages/google-cloud-translate/samples/README.md +++ b/packages/google-cloud-translate/samples/README.md @@ -1,204 +1,123 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." Google Cloud Platform logo -# Google Cloud Translation API: Node.js Samples +The [Cloud Translation API](https://cloud.google.com/translate/docs/), +can dynamically translate text between thousands +of language pairs. The Cloud Translation API lets websites and programs +integrate with the translation service programmatically. The Cloud Translation +API is part of the larger Cloud Machine Learning API family. Samples + [![Open in Cloud Shell][shell_img]][shell_link] -The [Cloud Translation API](https://cloud.google.com/translate/docs), can dynamically translate text between thousands of language pairs. The Cloud Translation API lets websites and programs integrate with the translation service programmatically. The Cloud Translation API is part of the larger Cloud Machine Learning API family. + ## Table of Contents * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Quickstart](#quickstart) * [Translate](#translate) ## Before you begin -Before running the samples, make sure you've followed the steps in the -[Before you begin section](../README.md#before-you-begin) of the client -library's README. +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/nodejs-translate#using-the-client-library). -## Samples +### Translate V3 Beta Samples -### Translate +#### Install Dependencies -View the [source code][translate_0_code]. +From the [root directory](https://github.com/googleapis/nodejs-translate) of the client library install the dependencies: -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/translate.js,samples/README.md) +``` +npm install +``` -__Usage:__ `node translate.js --help` +Change to the samples directory, link the google-cloud/translate library from the parent, and install its dependencies: ``` -translate.js - -Commands: - translate.js detect Detects the language of one or more strings. - translate.js list [target] Lists available translation languages. To language names - in a language other than English, specify a target - language. - translate.js translate Translates one or more strings into the target language. - translate.js translate-with-model Translates one or more strings into the target language - using the specified model. +cd samples/ +npm link ../ +npm install +``` -Options: - --version Show version number [boolean] - --help Show help [boolean] +#### Run the Tests -Examples: - node translate.js detect "Hello world!" Detects the language of a string. - node translate.js detect "Hello world!" "Goodbye" Detects the languages of multiple strings. - node translate.js list Lists available translation languages with names in - English. - node translate.js list es Lists available translation languages with names in - Spanish. - node translate.js translate ru "Good morning!" Translates a string into Russian. - node translate.js translate ru "Good morning!" "Good night!" Translates multiple strings into Russian. - node translate.js translate-with-model ru nmt "Good Translates multiple strings into Russian using the - morning!" "Good night!" Premium model. +To run the tests for the entire sample, run -For more information, see https://cloud.google.com/translate/docs +``` +npm test ``` -[translate_0_docs]: https://cloud.google.com/translate/docs -[translate_0_code]: translate.js - -[shell_img]: //gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/README.md +To run the tests for only the translate v3 samples, run -### automlTranslationDataset +``` +npm run test-v3 +``` -View the [source code][automlTranslationDataset_code]. +To run the tests for a single translate v3 sample, run this command, substituting FILE_NAME with the name of a valid test file. -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/automl/automlTranslationDataset.js,samples/README.md) +``` +./node_modules/.bin/mocha test/v3beta1/FILE_NAME +``` -__Usage:__ `node automlTranslationDataset.js --help` +For example, to test the `translate_list_language_names_beta` sample, the command would be ``` -automlTranslationDataset.js +./node_modules/.bin/mocha test/v3beta1/translate_list_language_names_beta.test.js +``` -Commands: - automlTranslationDataset.js create-dataset creates a new Dataset - automlTranslationDataset.js list-datasets list all Datasets - automlTranslationDataset.js get-dataset Get a Dataset - automlTranslationDataset.js delete-dataset Delete a dataset - automlTranslationDataset.js import-data Import labeled items into dataset +To run a sample directly, call the file with the `node` command and any required CLI arguments: -Options: - --version Show version number [boolean] - --computeRegion, -c region name e.g. "us-central1" [string] [default: "us-central1"] - --datasetName, -n Name of the Dataset [string] [default: "testDataSet"] - --datasetId, -i Id of the dataset [string] - --filter, -f Name of the Dataset to search for [string] [default: "translationDatasetMetadata:*"] - --multilabel, -m Type of the classification problem, False - MULTICLASS, True - MULTILABEL. - [string] [default: false] - --outputUri, -o URI (or local path) to export dataset [string] - --path, -p URI or local path to input .csv, or array of .csv paths - [string] [default: "gs://nodejs-docs-samples-vcm/en-ja.csv"] - --projectId, -z The GCLOUD_PROJECT string, e.g. "my-gcloud-project" [number] [default: "nodejs-docs-samples"] - --source, -s The source language to be translated from [string] - --target, -t The target language to be translated to [string] - --help Show help [boolean] +``` +node v3beta1/FILE_NAME +``` -Examples: - node automlTranslationDataset.js create-dataset -n "newDataSet" -s "en" -t "ja" - node automlTranslationDataset.js list-datasets -f "translationDatasetMetadata:*" - node automlTranslationDataset.js get-dataset -i "DATASETID" - node automlTranslationDataset.js delete-dataset -i "DATASETID" - node automlTranslationDataset.js import-data -i "dataSetId" -p "gs://myproject/mytraindata.csv" +For example, to run the `translate_list_codes_beta` sample, you would run the following command, substituting your project ID in place of "your_project_id" -For more information, see https://cloud.google.com/translate/docs +``` +node v3beta1/translate_list_codes_beta.js "your_project_id" ``` -[automlTranslationDataset_docs]: https://cloud.google.com/translate/docs -[automlTranslationDataset_code]: automl/automlTranslationDataset.js +## Samples -[shell_img]: //gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/README.md -### automlTranslationModel -View the [source code][automlTranslationModel_code]. +### Quickstart -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/automl/automlTranslationModel.js,samples/README.md) +View the [source code](https://github.com/googleapis/nodejs-translate/blob/master/samples/quickstart.js). -__Usage:__ `node translate.js --help` +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) -``` -automlTranslationModel.js +__Usage:__ -Commands: - automlTranslationModel.js create-model creates a new Model - automlTranslationModel.js get-operation-status Gets status of current operation - automlTranslationModel.js list-models list all Models - automlTranslationModel.js get-model Get a Model - automlTranslationModel.js list-model-evaluations List model evaluations - automlTranslationModel.js get-model-evaluation Get model evaluation - automlTranslationModel.js delete-model Delete a Model -Options: - --version Show version number [boolean] - --computeRegion, -c region name e.g. "us-central1" [string] [default: "us-central1"] - --datasetId, -i Id of the dataset [string] - --filter, -f Name of the Dataset to search for [string] [default: ""] - --modelName, -m Name of the model [string] [default: false] - --modelId, -a Id of the model [string] [default: ""] - --modelEvaluationId, -e Id of the model evaluation [string] [default: ""] - --operationFullId, -o Full name of an operation [string] [default: ""] - --projectId, -z The GCLOUD_PROJECT string, e.g. "my-gcloud-project" [number] [default: "nodejs-docs-samples"] - --help Show help [boolean] +`node quickstart.js` -Examples: - node automlTranslationModel.js create-model -i "DatasetID" -m "myModelName" - node automlTranslationModel.js get-operation-status -i "datasetId" -o "OperationFullID" - node automlTranslationModel.js list-models -f "translationModelMetadata:*" - node automlTranslationModel.js get-model -a "ModelID" - node automlTranslationModel.js list-model-evaluations -a "ModelID" - node automlTranslationModel.js get-model-evaluation -a "ModelId" -e "ModelEvaluationID" - node automlTranslationModel.js delete-model -a "ModelID" -For more information, see https://cloud.google.com/translate/docs -``` +----- -[automlTranslationModel_docs]: https://cloud.google.com/translate/docs -[automlTranslationModel_code]: automl/automlTranslationModel.js -[shell_img]: //gstatic.com/cloudssh/images/open-btn.png -[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/README.md -### automlTranslationPredict -View the [source code][automlTranslationPredict_code]. +### Translate -[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/automl/automlTranslationPredict.js,samples/README.md) +View the [source code](https://github.com/googleapis/nodejs-translate/blob/master/samples/translate.js). -__Usage:__ `node translate.js --help` +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/translate.js,samples/README.md) -``` -automlTranslationPredict.js +__Usage:__ + + +`node translate.js` -Commands: - automlTranslationPredict.js predict classify the content -Options: - --version Show version number [boolean] - --computeRegion, -c region name e.g. "us-central1" [string] [default: "us-central1"] - --filePath, -f local text file path of the content to be classified - [string] [default: "./resources/testInput.txt"] - --modelId, -i Id of the model which will be used for text classification [string] - --projectId, -z The GCLOUD_PROJECT string, e.g. "my-gcloud-project" [number] [default: "203278707824"] - --translationAllowFallback, -t Use true if AutoML will fallback to use a Google translation model fortranslation - requests if the specified AutoML translation model cannotserve the request. Use false - to not use Google translation model. [string] [default: "False"] - --help Show help [boolean] -Examples: - node automlTranslationPredict.js predict -i "modelId" -f "./resources/testInput.txt" -t "False" -For more information, see https://cloud.google.com/translate/docs -``` -[automlTranslationPredict_docs]: https://cloud.google.com/translate/docs -[automlTranslationPredict_code]: automl/automlTranslationPredict.js -[shell_img]: //gstatic.com/cloudssh/images/open-btn.png +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png [shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-translate&page=editor&open_in_editor=samples/README.md +[product-docs]: https://cloud.google.com/translate/docs/ diff --git a/packages/google-cloud-translate/samples/package.json b/packages/google-cloud-translate/samples/package.json index 19ab438e92c..5300b63bf51 100644 --- a/packages/google-cloud-translate/samples/package.json +++ b/packages/google-cloud-translate/samples/package.json @@ -8,7 +8,8 @@ "node": ">=8" }, "scripts": { - "test": "mocha --recursive --timeout 90000" + "test": "mocha --recursive --timeout 90000", + "test-v3": "mocha ./test/v3beta1/*.js" }, "dependencies": { "@google-cloud/automl": "^1.0.0", diff --git a/packages/google-cloud-translate/samples/quickstart.js b/packages/google-cloud-translate/samples/quickstart.js index 1798e4316c6..65d00c900c7 100644 --- a/packages/google-cloud-translate/samples/quickstart.js +++ b/packages/google-cloud-translate/samples/quickstart.js @@ -15,10 +15,10 @@ 'use strict'; -// [START translate_quickstart] -async function quickstart( +async function main( projectId = 'YOUR_PROJECT_ID' // Your GCP Project Id ) { + // [START translate_quickstart] // Imports the Google Cloud client library const {Translate} = require('@google-cloud/translate'); @@ -39,4 +39,4 @@ async function quickstart( // [END translate_quickstart] const args = process.argv.slice(2); -quickstart(...args).catch(console.error); +main(...args).catch(console.error); diff --git a/packages/google-cloud-translate/synth.metadata b/packages/google-cloud-translate/synth.metadata index a1de7e72ce9..9883658ec27 100644 --- a/packages/google-cloud-translate/synth.metadata +++ b/packages/google-cloud-translate/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-05-17T19:53:41.693075Z", + "updateTime": "2019-05-17T22:13:39.352938Z", "sources": [ { "generator": {