/**
 * Copyright 2018, Google, Inc.
 * 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';

// [START automl_quickstart]
// TBD
// [END automl_quickstart]


@@ -17,9 +17,9 @@
  201
-8
+9
 , Go
@@ -607,68 +607,1797 @@
 ';%0A%0A
-// %5BSTART automl_quickstart%5D%0A// TBD%0A// %5BEND automl_quickstart%5D%0A
+async function main(%0A  projectId,%0A  computeRegion,%0A  modelId,%0A  filePath,%0A  scoreThreshold%0A) %7B%0A  // %5BSTART automl_quickstart%5D%0A  const automl = require('@google-cloud/automl');%0A  const fs = require('fs');%0A%0A  // Create client for prediction service.%0A  const client = new automl.PredictionServiceClient();%0A%0A  /**%0A   * TODO(developer): Uncomment the following line before running the sample.%0A   */%0A  // const projectId = %60The GCLOUD_PROJECT string, e.g. %22my-gcloud-project%22%60;%0A  // const computeRegion = %60region-name, e.g. %22us-central1%22%60;%0A  // const modelId = %60id of the model, e.g. %E2%80%9CICN723541179344731436%E2%80%9D%60;%0A  // const filePath = %60local text file path of content to be classified, e.g. %22./resources/flower.png%22%60;%0A  // const scoreThreshold = %60value between 0.0 and 1.0, e.g. %220.5%22%60;%0A%0A  // Get the full path of the model.%0A  const modelFullId = client.modelPath(projectId, computeRegion, modelId);%0A%0A  // Read the file content for prediction.%0A  const content = fs.readFileSync(filePath, 'base64');%0A%0A  const params = %7B%7D;%0A%0A  if (scoreThreshold) %7B%0A    params.score_threshold = scoreThreshold;%0A  %7D%0A%0A  // Set the payload by giving the content and type of the file.%0A  const payload = %7B%7D;%0A  payload.image = %7BimageBytes: content%7D;%0A%0A  // params is additional domain-specific parameters.%0A  // currently there is no additional parameters supported.%0A  const %5Bresponse%5D = await client.predict(%7B%0A    name: modelFullId,%0A    payload: payload,%0A    params: params,%0A  %7D);%0A  console.log(%60Prediction results:%60);%0A  response.payload.forEach(result =%3E %7B%0A    console.log(%60Predicted class name: $%7Bresult.displayName%7D%60);%0A    console.log(%60Predicted class score: $%7Bresult.classification.score%7D%60);%0A  %7D);%0A  // %5BEND automl_quickstart%5D%0A%7D%0Amain(...process.argv.slice(2)).catch(err =%3E %7B%0A  console.error(err);%0A  process.exitCode = 1;%0A%7D);
 %0A

add .repo-metadata.json; allows us to generate new docs site (#183)