diff --git a/packages/google-cloud-vision/src/v1/image_annotator_client.js b/packages/google-cloud-vision/src/v1/image_annotator_client.js index 65a44231a47..7147be4e4dc 100644 --- a/packages/google-cloud-vision/src/v1/image_annotator_client.js +++ b/packages/google-cloud-vision/src/v1/image_annotator_client.js @@ -302,20 +302,14 @@ class ImageAnnotatorClient { * // Handle the operation using the promise pattern. * client.asyncBatchAnnotateFiles({requests: requests}) * .then(responses => { - * const operation = responses[0]; - * const initialApiResponse = responses[1]; + * const [operation, initialApiResponse] = responses; * * // Operation#promise starts polling for the completion of the LRO. * return operation.promise(); * }) * .then(responses => { - * // The final result of the operation. * const result = responses[0]; - * - * // The metadata value of the completed operation. * const metadata = responses[1]; - * - * // The response of the api call returning the complete operation. * const finalApiResponse = responses[2]; * }) * .catch(err => { @@ -327,8 +321,7 @@ class ImageAnnotatorClient { * // Handle the operation using the event emitter pattern. * client.asyncBatchAnnotateFiles({requests: requests}) * .then(responses => { - * const operation = responses[0]; - * const initialApiResponse = responses[1]; + * const [operation, initialApiResponse] = responses; * * // Adding a listener for the "complete" event starts polling for the * // completion of the operation. diff --git a/packages/google-cloud-vision/src/v1/product_search_client.js b/packages/google-cloud-vision/src/v1/product_search_client.js index c821079ea74..cfd3c2527ba 100644 --- a/packages/google-cloud-vision/src/v1/product_search_client.js +++ b/packages/google-cloud-vision/src/v1/product_search_client.js @@ -411,7 +411,7 @@ class ProductSearchClient { * client.listProducts({parent: formattedParent}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]) * } * }) @@ -431,7 +431,7 @@ class ProductSearchClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]); * } * if (nextRequest) { @@ -745,7 +745,7 @@ class ProductSearchClient { * client.listReferenceImages({parent: formattedParent}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]) * } * }) @@ -765,7 +765,7 @@ class ProductSearchClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]); * } * if (nextRequest) { @@ -1159,7 +1159,7 @@ class ProductSearchClient { * client.listProductSets({parent: formattedParent}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]) * } * }) @@ -1179,7 +1179,7 @@ class ProductSearchClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]); * } * if (nextRequest) { @@ -1603,7 +1603,7 @@ class ProductSearchClient { * client.listProductsInProductSet({name: formattedName}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]) * } * }) @@ -1623,7 +1623,7 @@ class ProductSearchClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]); * } * if (nextRequest) { @@ -1761,20 +1761,14 @@ class ProductSearchClient { * // Handle the operation using the promise pattern. * client.importProductSets(request) * .then(responses => { - * const operation = responses[0]; - * const initialApiResponse = responses[1]; + * const [operation, initialApiResponse] = responses; * * // Operation#promise starts polling for the completion of the LRO. * return operation.promise(); * }) * .then(responses => { - * // The final result of the operation. * const result = responses[0]; - * - * // The metadata value of the completed operation. * const metadata = responses[1]; - * - * // The response of the api call returning the complete operation. * const finalApiResponse = responses[2]; * }) * .catch(err => { @@ -1791,8 +1785,7 @@ class ProductSearchClient { * // Handle the operation using the event emitter pattern. * client.importProductSets(request) * .then(responses => { - * const operation = responses[0]; - * const initialApiResponse = responses[1]; + * const [operation, initialApiResponse] = responses; * * // Adding a listener for the "complete" event starts polling for the * // completion of the operation. diff --git a/packages/google-cloud-vision/src/v1p2beta1/image_annotator_client.js b/packages/google-cloud-vision/src/v1p2beta1/image_annotator_client.js index 68c8e470edf..2487c0568e7 100644 --- a/packages/google-cloud-vision/src/v1p2beta1/image_annotator_client.js +++ b/packages/google-cloud-vision/src/v1p2beta1/image_annotator_client.js @@ -302,20 +302,14 @@ class ImageAnnotatorClient { * // Handle the operation using the promise pattern. * client.asyncBatchAnnotateFiles({requests: requests}) * .then(responses => { - * const operation = responses[0]; - * const initialApiResponse = responses[1]; + * const [operation, initialApiResponse] = responses; * * // Operation#promise starts polling for the completion of the LRO. * return operation.promise(); * }) * .then(responses => { - * // The final result of the operation. * const result = responses[0]; - * - * // The metadata value of the completed operation. * const metadata = responses[1]; - * - * // The response of the api call returning the complete operation. * const finalApiResponse = responses[2]; * }) * .catch(err => { @@ -327,8 +321,7 @@ class ImageAnnotatorClient { * // Handle the operation using the event emitter pattern. * client.asyncBatchAnnotateFiles({requests: requests}) * .then(responses => { - * const operation = responses[0]; - * const initialApiResponse = responses[1]; + * const [operation, initialApiResponse] = responses; * * // Adding a listener for the "complete" event starts polling for the * // completion of the operation. diff --git a/packages/google-cloud-vision/src/v1p3beta1/image_annotator_client.js b/packages/google-cloud-vision/src/v1p3beta1/image_annotator_client.js index 8ac392b48e3..27fdc16ccf5 100644 --- a/packages/google-cloud-vision/src/v1p3beta1/image_annotator_client.js +++ b/packages/google-cloud-vision/src/v1p3beta1/image_annotator_client.js @@ -302,20 +302,14 @@ class ImageAnnotatorClient { * // Handle the operation using the promise pattern. * client.asyncBatchAnnotateFiles({requests: requests}) * .then(responses => { - * const operation = responses[0]; - * const initialApiResponse = responses[1]; + * const [operation, initialApiResponse] = responses; * * // Operation#promise starts polling for the completion of the LRO. * return operation.promise(); * }) * .then(responses => { - * // The final result of the operation. * const result = responses[0]; - * - * // The metadata value of the completed operation. * const metadata = responses[1]; - * - * // The response of the api call returning the complete operation. * const finalApiResponse = responses[2]; * }) * .catch(err => { @@ -327,8 +321,7 @@ class ImageAnnotatorClient { * // Handle the operation using the event emitter pattern. * client.asyncBatchAnnotateFiles({requests: requests}) * .then(responses => { - * const operation = responses[0]; - * const initialApiResponse = responses[1]; + * const [operation, initialApiResponse] = responses; * * // Adding a listener for the "complete" event starts polling for the * // completion of the operation. diff --git a/packages/google-cloud-vision/src/v1p3beta1/product_search_client.js b/packages/google-cloud-vision/src/v1p3beta1/product_search_client.js index 25c4e241195..f260a61b4e0 100644 --- a/packages/google-cloud-vision/src/v1p3beta1/product_search_client.js +++ b/packages/google-cloud-vision/src/v1p3beta1/product_search_client.js @@ -410,7 +410,7 @@ class ProductSearchClient { * client.listProductSets({parent: formattedParent}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]) * } * }) @@ -430,7 +430,7 @@ class ProductSearchClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]); * } * if (nextRequest) { @@ -808,7 +808,7 @@ class ProductSearchClient { * client.listProducts({parent: formattedParent}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]) * } * }) @@ -828,7 +828,7 @@ class ProductSearchClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]); * } * if (nextRequest) { @@ -1282,7 +1282,7 @@ class ProductSearchClient { * client.listReferenceImages({parent: formattedParent}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]) * } * }) @@ -1302,7 +1302,7 @@ class ProductSearchClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]); * } * if (nextRequest) { @@ -1618,7 +1618,7 @@ class ProductSearchClient { * client.listProductsInProductSet({name: formattedName}) * .then(responses => { * const resources = responses[0]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]) * } * }) @@ -1638,7 +1638,7 @@ class ProductSearchClient { * const nextRequest = responses[1]; * // The actual response object, if necessary. * // const rawResponse = responses[2]; - * for (let i = 0; i < resources.length; i += 1) { + * for (const resource of resources) { * // doThingsWith(resources[i]); * } * if (nextRequest) { @@ -1776,20 +1776,14 @@ class ProductSearchClient { * // Handle the operation using the promise pattern. * client.importProductSets(request) * .then(responses => { - * const operation = responses[0]; - * const initialApiResponse = responses[1]; + * const [operation, initialApiResponse] = responses; * * // Operation#promise starts polling for the completion of the LRO. * return operation.promise(); * }) * .then(responses => { - * // The final result of the operation. * const result = responses[0]; - * - * // The metadata value of the completed operation. * const metadata = responses[1]; - * - * // The response of the api call returning the complete operation. * const finalApiResponse = responses[2]; * }) * .catch(err => { @@ -1806,8 +1800,7 @@ class ProductSearchClient { * // Handle the operation using the event emitter pattern. * client.importProductSets(request) * .then(responses => { - * const operation = responses[0]; - * const initialApiResponse = responses[1]; + * const [operation, initialApiResponse] = responses; * * // Adding a listener for the "complete" event starts polling for the * // completion of the operation. diff --git a/packages/google-cloud-vision/synth.metadata b/packages/google-cloud-vision/synth.metadata index 2ac04e59c1f..cd926baa72b 100644 --- a/packages/google-cloud-vision/synth.metadata +++ b/packages/google-cloud-vision/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-01-17T12:47:29.238091Z", + "updateTime": "2019-02-02T12:27:39.142556Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.6", - "dockerImage": "googleapis/artman@sha256:12722f2ca3fbc3b53cc6aa5f0e569d7d221b46bd876a2136497089dec5e3634e" + "version": "0.16.8", + "dockerImage": "googleapis/artman@sha256:75bc07ef34a1de9895c18af54dc503ed3b3f3b52e85062e3360a979d2a0741e7" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "0ac60e21a1aa86c07c1836865b35308ba8178b05", - "internalRef": "229626798" + "sha": "bce093dab3e65c40eb9a37efbdc960f34df6037a", + "internalRef": "231974277" } }, {