diff --git a/packages/google-cloud-vision/samples/generated/v1/image_annotator.async_batch_annotate_files.js b/packages/google-cloud-vision/samples/generated/v1/image_annotator.async_batch_annotate_files.js index 302ffbc63b1..5eeec88568d 100644 --- a/packages/google-cloud-vision/samples/generated/v1/image_annotator.async_batch_annotate_files.js +++ b/packages/google-cloud-vision/samples/generated/v1/image_annotator.async_batch_annotate_files.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/image_annotator.async_batch_annotate_images.js b/packages/google-cloud-vision/samples/generated/v1/image_annotator.async_batch_annotate_images.js index 014b7720ca6..82011930dfe 100644 --- a/packages/google-cloud-vision/samples/generated/v1/image_annotator.async_batch_annotate_images.js +++ b/packages/google-cloud-vision/samples/generated/v1/image_annotator.async_batch_annotate_images.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/image_annotator.batch_annotate_files.js b/packages/google-cloud-vision/samples/generated/v1/image_annotator.batch_annotate_files.js index 419523fdfc9..c29ac36b691 100644 --- a/packages/google-cloud-vision/samples/generated/v1/image_annotator.batch_annotate_files.js +++ b/packages/google-cloud-vision/samples/generated/v1/image_annotator.batch_annotate_files.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/image_annotator.batch_annotate_images.js b/packages/google-cloud-vision/samples/generated/v1/image_annotator.batch_annotate_images.js index 59af8434920..fb2e89666ed 100644 --- a/packages/google-cloud-vision/samples/generated/v1/image_annotator.batch_annotate_images.js +++ b/packages/google-cloud-vision/samples/generated/v1/image_annotator.batch_annotate_images.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.add_product_to_product_set.js b/packages/google-cloud-vision/samples/generated/v1/product_search.add_product_to_product_set.js index e0e30ec1224..b22381811c8 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.add_product_to_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.add_product_to_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.create_product.js b/packages/google-cloud-vision/samples/generated/v1/product_search.create_product.js index 9afa77ceb26..fb8b20ad3d1 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.create_product.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.create_product.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.create_product_set.js b/packages/google-cloud-vision/samples/generated/v1/product_search.create_product_set.js index 64495794d97..ccce35b4bcd 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.create_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.create_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.create_reference_image.js b/packages/google-cloud-vision/samples/generated/v1/product_search.create_reference_image.js index e862a2a359e..dfa47dab634 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.create_reference_image.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.create_reference_image.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.delete_product.js b/packages/google-cloud-vision/samples/generated/v1/product_search.delete_product.js index 9113200eca0..ba89afb53fb 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.delete_product.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.delete_product.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.delete_product_set.js b/packages/google-cloud-vision/samples/generated/v1/product_search.delete_product_set.js index c32868cd1a0..685141b3513 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.delete_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.delete_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.delete_reference_image.js b/packages/google-cloud-vision/samples/generated/v1/product_search.delete_reference_image.js index 02edd12aed0..bd5763394c5 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.delete_reference_image.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.delete_reference_image.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.get_product.js b/packages/google-cloud-vision/samples/generated/v1/product_search.get_product.js index 4af8a9baf3d..37ddc7e8fa9 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.get_product.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.get_product.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.get_product_set.js b/packages/google-cloud-vision/samples/generated/v1/product_search.get_product_set.js index 7ae8243af45..6ebbc94bbf5 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.get_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.get_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.get_reference_image.js b/packages/google-cloud-vision/samples/generated/v1/product_search.get_reference_image.js index 1e582d11fb2..18dba604271 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.get_reference_image.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.get_reference_image.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.import_product_sets.js b/packages/google-cloud-vision/samples/generated/v1/product_search.import_product_sets.js index 19250361978..0129434538d 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.import_product_sets.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.import_product_sets.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.list_product_sets.js b/packages/google-cloud-vision/samples/generated/v1/product_search.list_product_sets.js index 595a076e56c..a0a9f7f58e1 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.list_product_sets.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.list_product_sets.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.list_products.js b/packages/google-cloud-vision/samples/generated/v1/product_search.list_products.js index 2a9306a6f6f..3f92f87a302 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.list_products.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.list_products.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.list_products_in_product_set.js b/packages/google-cloud-vision/samples/generated/v1/product_search.list_products_in_product_set.js index 2f8ee21a14a..2044174814e 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.list_products_in_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.list_products_in_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.list_reference_images.js b/packages/google-cloud-vision/samples/generated/v1/product_search.list_reference_images.js index a0f293b0073..f2c0ec3e864 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.list_reference_images.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.list_reference_images.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.purge_products.js b/packages/google-cloud-vision/samples/generated/v1/product_search.purge_products.js index 05cf6a03ec0..e3570b65b1c 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.purge_products.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.purge_products.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.remove_product_from_product_set.js b/packages/google-cloud-vision/samples/generated/v1/product_search.remove_product_from_product_set.js index d5b8f9fec12..011c4714c6e 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.remove_product_from_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.remove_product_from_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.update_product.js b/packages/google-cloud-vision/samples/generated/v1/product_search.update_product.js index 2ebac607edb..f229be48fea 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.update_product.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.update_product.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/product_search.update_product_set.js b/packages/google-cloud-vision/samples/generated/v1/product_search.update_product_set.js index d7ba652950c..9eb4229d29b 100644 --- a/packages/google-cloud-vision/samples/generated/v1/product_search.update_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1/product_search.update_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json new file mode 100644 index 00000000000..8b1bcfa28bd --- /dev/null +++ b/packages/google-cloud-vision/samples/generated/v1/snippet_metadata.google.cloud.vision.v1.json @@ -0,0 +1,1043 @@ +{ + "clientLibrary": { + "name": "nodejs-vision", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.vision.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "vision_v1_generated_ImageAnnotator_BatchAnnotateImages_async", + "title": "vision batchAnnotateImages Sample", + "origin": "API_DEFINITION", + "description": " Run image detection and annotation for a batch of images.", + "canonical": true, + "file": "image_annotator.batch_annotate_images.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchAnnotateImages", + "fullName": "google.cloud.vision.v1.ImageAnnotator.BatchAnnotateImages", + "async": true, + "parameters": [ + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1.BatchAnnotateImagesResponse", + "client": { + "shortName": "ImageAnnotatorClient", + "fullName": "google.cloud.vision.v1.ImageAnnotatorClient" + }, + "method": { + "shortName": "BatchAnnotateImages", + "fullName": "google.cloud.vision.v1.ImageAnnotator.BatchAnnotateImages", + "service": { + "shortName": "ImageAnnotator", + "fullName": "google.cloud.vision.v1.ImageAnnotator" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ImageAnnotator_BatchAnnotateFiles_async", + "title": "vision batchAnnotateFiles Sample", + "origin": "API_DEFINITION", + "description": " Service that performs image detection and annotation for a batch of files. Now only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. This service will extract at most 5 (customers can specify which 5 in AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and perform detection and annotation for each image extracted.", + "canonical": true, + "file": "image_annotator.batch_annotate_files.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchAnnotateFiles", + "fullName": "google.cloud.vision.v1.ImageAnnotator.BatchAnnotateFiles", + "async": true, + "parameters": [ + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1.BatchAnnotateFilesResponse", + "client": { + "shortName": "ImageAnnotatorClient", + "fullName": "google.cloud.vision.v1.ImageAnnotatorClient" + }, + "method": { + "shortName": "BatchAnnotateFiles", + "fullName": "google.cloud.vision.v1.ImageAnnotator.BatchAnnotateFiles", + "service": { + "shortName": "ImageAnnotator", + "fullName": "google.cloud.vision.v1.ImageAnnotator" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateImages_async", + "title": "vision asyncBatchAnnotateImages Sample", + "origin": "API_DEFINITION", + "description": " Run asynchronous image detection and annotation for a list of images. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). This service will write image annotation outputs to json files in customer GCS bucket, each json file containing BatchAnnotateImagesResponse proto.", + "canonical": true, + "file": "image_annotator.async_batch_annotate_images.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AsyncBatchAnnotateImages", + "fullName": "google.cloud.vision.v1.ImageAnnotator.AsyncBatchAnnotateImages", + "async": true, + "parameters": [ + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "output_config", + "type": ".google.cloud.vision.v1.OutputConfig" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ImageAnnotatorClient", + "fullName": "google.cloud.vision.v1.ImageAnnotatorClient" + }, + "method": { + "shortName": "AsyncBatchAnnotateImages", + "fullName": "google.cloud.vision.v1.ImageAnnotator.AsyncBatchAnnotateImages", + "service": { + "shortName": "ImageAnnotator", + "fullName": "google.cloud.vision.v1.ImageAnnotator" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async", + "title": "vision asyncBatchAnnotateFiles Sample", + "origin": "API_DEFINITION", + "description": " Run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).", + "canonical": true, + "file": "image_annotator.async_batch_annotate_files.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AsyncBatchAnnotateFiles", + "fullName": "google.cloud.vision.v1.ImageAnnotator.AsyncBatchAnnotateFiles", + "async": true, + "parameters": [ + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "parent", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ImageAnnotatorClient", + "fullName": "google.cloud.vision.v1.ImageAnnotatorClient" + }, + "method": { + "shortName": "AsyncBatchAnnotateFiles", + "fullName": "google.cloud.vision.v1.ImageAnnotator.AsyncBatchAnnotateFiles", + "service": { + "shortName": "ImageAnnotator", + "fullName": "google.cloud.vision.v1.ImageAnnotator" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_CreateProductSet_async", + "title": "vision createProductSet Sample", + "origin": "API_DEFINITION", + "description": " Creates and returns a new ProductSet resource. Possible errors: * Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters.", + "canonical": true, + "file": "product_search.create_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateProductSet", + "fullName": "google.cloud.vision.v1.ProductSearch.CreateProductSet", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "product_set", + "type": ".google.cloud.vision.v1.ProductSet" + }, + { + "name": "product_set_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1.ProductSet", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "CreateProductSet", + "fullName": "google.cloud.vision.v1.ProductSearch.CreateProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_ListProductSets_async", + "title": "vision listProductSets Sample", + "origin": "API_DEFINITION", + "description": " Lists ProductSets in an unspecified order. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1.", + "canonical": true, + "file": "product_search.list_product_sets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListProductSets", + "fullName": "google.cloud.vision.v1.ProductSearch.ListProductSets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1.ListProductSetsResponse", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "ListProductSets", + "fullName": "google.cloud.vision.v1.ProductSearch.ListProductSets", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_GetProductSet_async", + "title": "vision getProductSet Sample", + "origin": "API_DEFINITION", + "description": " Gets information associated with a ProductSet. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist.", + "canonical": true, + "file": "product_search.get_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetProductSet", + "fullName": "google.cloud.vision.v1.ProductSearch.GetProductSet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1.ProductSet", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "GetProductSet", + "fullName": "google.cloud.vision.v1.ProductSearch.GetProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_UpdateProductSet_async", + "title": "vision updateProductSet Sample", + "origin": "API_DEFINITION", + "description": " Makes changes to a ProductSet resource. Only display_name can be updated currently. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist. * Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the request or longer than 4096 characters.", + "canonical": true, + "file": "product_search.update_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateProductSet", + "fullName": "google.cloud.vision.v1.ProductSearch.UpdateProductSet", + "async": true, + "parameters": [ + { + "name": "product_set", + "type": ".google.cloud.vision.v1.ProductSet" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.vision.v1.ProductSet", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "UpdateProductSet", + "fullName": "google.cloud.vision.v1.ProductSearch.UpdateProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_DeleteProductSet_async", + "title": "vision deleteProductSet Sample", + "origin": "API_DEFINITION", + "description": " Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not deleted. The actual image files are not deleted from Google Cloud Storage.", + "canonical": true, + "file": "product_search.delete_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteProductSet", + "fullName": "google.cloud.vision.v1.ProductSearch.DeleteProductSet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "DeleteProductSet", + "fullName": "google.cloud.vision.v1.ProductSearch.DeleteProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_CreateProduct_async", + "title": "vision createProduct Sample", + "origin": "API_DEFINITION", + "description": " Creates and returns a new product resource. Possible errors: * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. * Returns INVALID_ARGUMENT if description is longer than 4096 characters. * Returns INVALID_ARGUMENT if product_category is missing or invalid.", + "canonical": true, + "file": "product_search.create_product.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateProduct", + "fullName": "google.cloud.vision.v1.ProductSearch.CreateProduct", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "product", + "type": ".google.cloud.vision.v1.Product" + }, + { + "name": "product_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1.Product", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "CreateProduct", + "fullName": "google.cloud.vision.v1.ProductSearch.CreateProduct", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_ListProducts_async", + "title": "vision listProducts Sample", + "origin": "API_DEFINITION", + "description": " Lists products in an unspecified order. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.", + "canonical": true, + "file": "product_search.list_products.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListProducts", + "fullName": "google.cloud.vision.v1.ProductSearch.ListProducts", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1.ListProductsResponse", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "ListProducts", + "fullName": "google.cloud.vision.v1.ProductSearch.ListProducts", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_GetProduct_async", + "title": "vision getProduct Sample", + "origin": "API_DEFINITION", + "description": " Gets information associated with a Product. Possible errors: * Returns NOT_FOUND if the Product does not exist.", + "canonical": true, + "file": "product_search.get_product.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetProduct", + "fullName": "google.cloud.vision.v1.ProductSearch.GetProduct", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1.Product", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "GetProduct", + "fullName": "google.cloud.vision.v1.ProductSearch.GetProduct", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_UpdateProduct_async", + "title": "vision updateProduct Sample", + "origin": "API_DEFINITION", + "description": " Makes changes to a Product resource. Only the `display_name`, `description`, and `labels` fields can be updated right now. If labels are updated, the change will not be reflected in queries until the next index time. Possible errors: * Returns NOT_FOUND if the Product does not exist. * Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from the request or longer than 4096 characters. * Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 characters. * Returns INVALID_ARGUMENT if product_category is present in update_mask.", + "canonical": true, + "file": "product_search.update_product.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateProduct", + "fullName": "google.cloud.vision.v1.ProductSearch.UpdateProduct", + "async": true, + "parameters": [ + { + "name": "product", + "type": ".google.cloud.vision.v1.Product" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.vision.v1.Product", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "UpdateProduct", + "fullName": "google.cloud.vision.v1.ProductSearch.UpdateProduct", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_DeleteProduct_async", + "title": "vision deleteProduct Sample", + "origin": "API_DEFINITION", + "description": " Permanently deletes a product and its reference images. Metadata of the product and all its images will be deleted right away, but search queries against ProductSets containing the product may still work until all related caches are refreshed.", + "canonical": true, + "file": "product_search.delete_product.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteProduct", + "fullName": "google.cloud.vision.v1.ProductSearch.DeleteProduct", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "DeleteProduct", + "fullName": "google.cloud.vision.v1.ProductSearch.DeleteProduct", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_CreateReferenceImage_async", + "title": "vision createReferenceImage Sample", + "origin": "API_DEFINITION", + "description": " Creates and returns a new ReferenceImage resource. The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will try to detect regions of interest in the image that are compatible with the product_category on the parent product. If it is specified, detection is ALWAYS skipped. The system converts polygons into non-rotated rectangles. Note that the pipeline will resize the image if the image resolution is too large to process (above 50MP). Possible errors: * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. * Returns INVALID_ARGUMENT if the product does not exist. * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with the parent product's product_category is detected. * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.", + "canonical": true, + "file": "product_search.create_reference_image.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateReferenceImage", + "fullName": "google.cloud.vision.v1.ProductSearch.CreateReferenceImage", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "reference_image", + "type": ".google.cloud.vision.v1.ReferenceImage" + }, + { + "name": "reference_image_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1.ReferenceImage", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "CreateReferenceImage", + "fullName": "google.cloud.vision.v1.ProductSearch.CreateReferenceImage", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_DeleteReferenceImage_async", + "title": "vision deleteReferenceImage Sample", + "origin": "API_DEFINITION", + "description": " Permanently deletes a reference image. The image metadata will be deleted right away, but search queries against ProductSets containing the image may still work until all related caches are refreshed. The actual image files are not deleted from Google Cloud Storage.", + "canonical": true, + "file": "product_search.delete_reference_image.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteReferenceImage", + "fullName": "google.cloud.vision.v1.ProductSearch.DeleteReferenceImage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "DeleteReferenceImage", + "fullName": "google.cloud.vision.v1.ProductSearch.DeleteReferenceImage", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_ListReferenceImages_async", + "title": "vision listReferenceImages Sample", + "origin": "API_DEFINITION", + "description": " Lists reference images. Possible errors: * Returns NOT_FOUND if the parent product does not exist. * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1.", + "canonical": true, + "file": "product_search.list_reference_images.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReferenceImages", + "fullName": "google.cloud.vision.v1.ProductSearch.ListReferenceImages", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1.ListReferenceImagesResponse", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "ListReferenceImages", + "fullName": "google.cloud.vision.v1.ProductSearch.ListReferenceImages", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_GetReferenceImage_async", + "title": "vision getReferenceImage Sample", + "origin": "API_DEFINITION", + "description": " Gets information associated with a ReferenceImage. Possible errors: * Returns NOT_FOUND if the specified image does not exist.", + "canonical": true, + "file": "product_search.get_reference_image.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetReferenceImage", + "fullName": "google.cloud.vision.v1.ProductSearch.GetReferenceImage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1.ReferenceImage", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "GetReferenceImage", + "fullName": "google.cloud.vision.v1.ProductSearch.GetReferenceImage", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_AddProductToProductSet_async", + "title": "vision addProductToProductSet Sample", + "origin": "API_DEFINITION", + "description": " Adds a Product to the specified ProductSet. If the Product is already present, no change is made. One Product can be added to at most 100 ProductSets. Possible errors: * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.", + "canonical": true, + "file": "product_search.add_product_to_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AddProductToProductSet", + "fullName": "google.cloud.vision.v1.ProductSearch.AddProductToProductSet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "product", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "AddProductToProductSet", + "fullName": "google.cloud.vision.v1.ProductSearch.AddProductToProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_RemoveProductFromProductSet_async", + "title": "vision removeProductFromProductSet Sample", + "origin": "API_DEFINITION", + "description": " Removes a Product from the specified ProductSet.", + "canonical": true, + "file": "product_search.remove_product_from_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveProductFromProductSet", + "fullName": "google.cloud.vision.v1.ProductSearch.RemoveProductFromProductSet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "product", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "RemoveProductFromProductSet", + "fullName": "google.cloud.vision.v1.ProductSearch.RemoveProductFromProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_ListProductsInProductSet_async", + "title": "vision listProductsInProductSet Sample", + "origin": "API_DEFINITION", + "description": " Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, the products field of the response will be empty. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.", + "canonical": true, + "file": "product_search.list_products_in_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListProductsInProductSet", + "fullName": "google.cloud.vision.v1.ProductSearch.ListProductsInProductSet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1.ListProductsInProductSetResponse", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "ListProductsInProductSet", + "fullName": "google.cloud.vision.v1.ProductSearch.ListProductsInProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_ImportProductSets_async", + "title": "vision importProductSets Sample", + "origin": "API_DEFINITION", + "description": " Asynchronous API that imports a list of reference images to specified product sets based on a list of image information. The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the progress and results of the request. `Operation.metadata` contains `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. (results) The input source of this method is a csv file on Google Cloud Storage. For the format of the csv file please see [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1.ImportProductSetsGcsSource.csv_file_uri].", + "canonical": true, + "file": "product_search.import_product_sets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ImportProductSets", + "fullName": "google.cloud.vision.v1.ProductSearch.ImportProductSets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "input_config", + "type": ".google.cloud.vision.v1.ImportProductSetsInputConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "ImportProductSets", + "fullName": "google.cloud.vision.v1.ProductSearch.ImportProductSets", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1_generated_ProductSearch_PurgeProducts_async", + "title": "vision purgeProducts Sample", + "origin": "API_DEFINITION", + "description": " Asynchronous API to delete all Products in a ProductSet or all Products that are in no ProductSet. If a Product is a member of the specified ProductSet in addition to other ProductSets, the Product will still be deleted. It is recommended to not delete the specified ProductSet until after this operation has completed. It is also recommended to not add any of the Products involved in the batch delete to a new ProductSet while this operation is running because those Products may still end up deleted. It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep the csv files used in ImportProductSets (if that was how you originally built the Product Set) before starting PurgeProducts, in case you need to re-import the data after deletion. If the plan is to purge all of the Products from a ProductSet and then re-use the empty ProductSet to re-import new Products into the empty ProductSet, you must wait until the PurgeProducts operation has finished for that ProductSet. The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the progress and results of the request. `Operation.metadata` contains `BatchOperationMetadata`. (progress)", + "canonical": true, + "file": "product_search.purge_products.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PurgeProducts", + "fullName": "google.cloud.vision.v1.ProductSearch.PurgeProducts", + "async": true, + "parameters": [ + { + "name": "product_set_purge_config", + "type": ".google.cloud.vision.v1.ProductSetPurgeConfig" + }, + { + "name": "delete_orphan_products", + "type": "TYPE_BOOL" + }, + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1.ProductSearchClient" + }, + "method": { + "shortName": "PurgeProducts", + "fullName": "google.cloud.vision.v1.ProductSearch.PurgeProducts", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1.ProductSearch" + } + } + } + } + ] +} diff --git a/packages/google-cloud-vision/samples/generated/v1p1beta1/image_annotator.batch_annotate_images.js b/packages/google-cloud-vision/samples/generated/v1p1beta1/image_annotator.batch_annotate_images.js index 7dadccad797..1f0ddde08db 100644 --- a/packages/google-cloud-vision/samples/generated/v1p1beta1/image_annotator.batch_annotate_images.js +++ b/packages/google-cloud-vision/samples/generated/v1p1beta1/image_annotator.batch_annotate_images.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json new file mode 100644 index 00000000000..9d8765f31ca --- /dev/null +++ b/packages/google-cloud-vision/samples/generated/v1p1beta1/snippet_metadata.google.cloud.vision.v1p1beta1.json @@ -0,0 +1,55 @@ +{ + "clientLibrary": { + "name": "nodejs-vision", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.vision.v1p1beta1", + "version": "v1p1beta1" + } + ] + }, + "snippets": [ + { + "regionTag": "vision_v1p1beta1_generated_ImageAnnotator_BatchAnnotateImages_async", + "title": "vision batchAnnotateImages Sample", + "origin": "API_DEFINITION", + "description": " Run image detection and annotation for a batch of images.", + "canonical": true, + "file": "image_annotator.batch_annotate_images.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchAnnotateImages", + "fullName": "google.cloud.vision.v1p1beta1.ImageAnnotator.BatchAnnotateImages", + "async": true, + "parameters": [ + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse", + "client": { + "shortName": "ImageAnnotatorClient", + "fullName": "google.cloud.vision.v1p1beta1.ImageAnnotatorClient" + }, + "method": { + "shortName": "BatchAnnotateImages", + "fullName": "google.cloud.vision.v1p1beta1.ImageAnnotator.BatchAnnotateImages", + "service": { + "shortName": "ImageAnnotator", + "fullName": "google.cloud.vision.v1p1beta1.ImageAnnotator" + } + } + } + } + ] +} diff --git a/packages/google-cloud-vision/samples/generated/v1p2beta1/image_annotator.async_batch_annotate_files.js b/packages/google-cloud-vision/samples/generated/v1p2beta1/image_annotator.async_batch_annotate_files.js index 0e191309e45..6f5474c4d4f 100644 --- a/packages/google-cloud-vision/samples/generated/v1p2beta1/image_annotator.async_batch_annotate_files.js +++ b/packages/google-cloud-vision/samples/generated/v1p2beta1/image_annotator.async_batch_annotate_files.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p2beta1/image_annotator.batch_annotate_images.js b/packages/google-cloud-vision/samples/generated/v1p2beta1/image_annotator.batch_annotate_images.js index b2a2bf6254f..c3fe0481670 100644 --- a/packages/google-cloud-vision/samples/generated/v1p2beta1/image_annotator.batch_annotate_images.js +++ b/packages/google-cloud-vision/samples/generated/v1p2beta1/image_annotator.batch_annotate_images.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json new file mode 100644 index 00000000000..9bc85307802 --- /dev/null +++ b/packages/google-cloud-vision/samples/generated/v1p2beta1/snippet_metadata.google.cloud.vision.v1p2beta1.json @@ -0,0 +1,95 @@ +{ + "clientLibrary": { + "name": "nodejs-vision", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.vision.v1p2beta1", + "version": "v1p2beta1" + } + ] + }, + "snippets": [ + { + "regionTag": "vision_v1p2beta1_generated_ImageAnnotator_BatchAnnotateImages_async", + "title": "vision batchAnnotateImages Sample", + "origin": "API_DEFINITION", + "description": " Run image detection and annotation for a batch of images.", + "canonical": true, + "file": "image_annotator.batch_annotate_images.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchAnnotateImages", + "fullName": "google.cloud.vision.v1p2beta1.ImageAnnotator.BatchAnnotateImages", + "async": true, + "parameters": [ + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse", + "client": { + "shortName": "ImageAnnotatorClient", + "fullName": "google.cloud.vision.v1p2beta1.ImageAnnotatorClient" + }, + "method": { + "shortName": "BatchAnnotateImages", + "fullName": "google.cloud.vision.v1p2beta1.ImageAnnotator.BatchAnnotateImages", + "service": { + "shortName": "ImageAnnotator", + "fullName": "google.cloud.vision.v1p2beta1.ImageAnnotator" + } + } + } + }, + { + "regionTag": "vision_v1p2beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async", + "title": "vision asyncBatchAnnotateFiles Sample", + "origin": "API_DEFINITION", + "description": " Run async image detection and annotation for a list of generic files (e.g. PDF) which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).", + "canonical": true, + "file": "image_annotator.async_batch_annotate_files.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AsyncBatchAnnotateFiles", + "fullName": "google.cloud.vision.v1p2beta1.ImageAnnotator.AsyncBatchAnnotateFiles", + "async": true, + "parameters": [ + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ImageAnnotatorClient", + "fullName": "google.cloud.vision.v1p2beta1.ImageAnnotatorClient" + }, + "method": { + "shortName": "AsyncBatchAnnotateFiles", + "fullName": "google.cloud.vision.v1p2beta1.ImageAnnotator.AsyncBatchAnnotateFiles", + "service": { + "shortName": "ImageAnnotator", + "fullName": "google.cloud.vision.v1p2beta1.ImageAnnotator" + } + } + } + } + ] +} diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/image_annotator.async_batch_annotate_files.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/image_annotator.async_batch_annotate_files.js index 17ef0843e0f..5a6a0d5f7f8 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/image_annotator.async_batch_annotate_files.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/image_annotator.async_batch_annotate_files.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/image_annotator.batch_annotate_images.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/image_annotator.batch_annotate_images.js index 56c532b4c03..1f9a00e0438 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/image_annotator.batch_annotate_images.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/image_annotator.batch_annotate_images.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.add_product_to_product_set.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.add_product_to_product_set.js index 9d32590e0ba..095ebc5aaa9 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.add_product_to_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.add_product_to_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.create_product.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.create_product.js index db944c2a215..5245629fe4f 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.create_product.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.create_product.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.create_product_set.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.create_product_set.js index 8e90cfff012..1a93791a696 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.create_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.create_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.create_reference_image.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.create_reference_image.js index baa3188f895..f5e1a797707 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.create_reference_image.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.create_reference_image.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.delete_product.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.delete_product.js index 7e54351f89f..92e5c99fb68 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.delete_product.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.delete_product.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.delete_product_set.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.delete_product_set.js index 71fa2f8ab40..9f7dc7dfb74 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.delete_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.delete_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.delete_reference_image.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.delete_reference_image.js index 700852668a5..46211ed72b5 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.delete_reference_image.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.delete_reference_image.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.get_product.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.get_product.js index 84bdcc2aa1f..b4597bf1f40 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.get_product.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.get_product.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.get_product_set.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.get_product_set.js index a6783ba631c..d084b99421e 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.get_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.get_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.get_reference_image.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.get_reference_image.js index 01da08fec42..33d14bebdcf 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.get_reference_image.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.get_reference_image.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.import_product_sets.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.import_product_sets.js index d2ea5d58eb4..326aa39b940 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.import_product_sets.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.import_product_sets.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.list_product_sets.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.list_product_sets.js index cd70bf372ff..849547991f5 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.list_product_sets.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.list_product_sets.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.list_products.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.list_products.js index 04253f86634..e1769e8c560 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.list_products.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.list_products.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.list_products_in_product_set.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.list_products_in_product_set.js index 79386cc7e26..76ecfd9216d 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.list_products_in_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.list_products_in_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.list_reference_images.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.list_reference_images.js index 6c5c559343a..3bdeba0c14e 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.list_reference_images.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.list_reference_images.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.remove_product_from_product_set.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.remove_product_from_product_set.js index 83f398defd8..f0db7e43819 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.remove_product_from_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.remove_product_from_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.update_product.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.update_product.js index e528a4296e7..50f9b2c206a 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.update_product.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.update_product.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.update_product_set.js b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.update_product_set.js index a8149437f33..cdd554e0e71 100644 --- a/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.update_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/product_search.update_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json new file mode 100644 index 00000000000..5ec94c1039e --- /dev/null +++ b/packages/google-cloud-vision/samples/generated/v1p3beta1/snippet_metadata.google.cloud.vision.v1p3beta1.json @@ -0,0 +1,891 @@ +{ + "clientLibrary": { + "name": "nodejs-vision", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.vision.v1p3beta1", + "version": "v1p3beta1" + } + ] + }, + "snippets": [ + { + "regionTag": "vision_v1p3beta1_generated_ImageAnnotator_BatchAnnotateImages_async", + "title": "vision batchAnnotateImages Sample", + "origin": "API_DEFINITION", + "description": " Run image detection and annotation for a batch of images.", + "canonical": true, + "file": "image_annotator.batch_annotate_images.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 49, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchAnnotateImages", + "fullName": "google.cloud.vision.v1p3beta1.ImageAnnotator.BatchAnnotateImages", + "async": true, + "parameters": [ + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse", + "client": { + "shortName": "ImageAnnotatorClient", + "fullName": "google.cloud.vision.v1p3beta1.ImageAnnotatorClient" + }, + "method": { + "shortName": "BatchAnnotateImages", + "fullName": "google.cloud.vision.v1p3beta1.ImageAnnotator.BatchAnnotateImages", + "service": { + "shortName": "ImageAnnotator", + "fullName": "google.cloud.vision.v1p3beta1.ImageAnnotator" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async", + "title": "vision asyncBatchAnnotateFiles Sample", + "origin": "API_DEFINITION", + "description": " Run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).", + "canonical": true, + "file": "image_annotator.async_batch_annotate_files.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AsyncBatchAnnotateFiles", + "fullName": "google.cloud.vision.v1p3beta1.ImageAnnotator.AsyncBatchAnnotateFiles", + "async": true, + "parameters": [ + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ImageAnnotatorClient", + "fullName": "google.cloud.vision.v1p3beta1.ImageAnnotatorClient" + }, + "method": { + "shortName": "AsyncBatchAnnotateFiles", + "fullName": "google.cloud.vision.v1p3beta1.ImageAnnotator.AsyncBatchAnnotateFiles", + "service": { + "shortName": "ImageAnnotator", + "fullName": "google.cloud.vision.v1p3beta1.ImageAnnotator" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_CreateProductSet_async", + "title": "vision createProductSet Sample", + "origin": "API_DEFINITION", + "description": " Creates and returns a new ProductSet resource. Possible errors: * Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters.", + "canonical": true, + "file": "product_search.create_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateProductSet", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.CreateProductSet", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "product_set", + "type": ".google.cloud.vision.v1p3beta1.ProductSet" + }, + { + "name": "product_set_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p3beta1.ProductSet", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "CreateProductSet", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.CreateProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_ListProductSets_async", + "title": "vision listProductSets Sample", + "origin": "API_DEFINITION", + "description": " Lists ProductSets in an unspecified order. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1.", + "canonical": true, + "file": "product_search.list_product_sets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListProductSets", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.ListProductSets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p3beta1.ListProductSetsResponse", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "ListProductSets", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.ListProductSets", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_GetProductSet_async", + "title": "vision getProductSet Sample", + "origin": "API_DEFINITION", + "description": " Gets information associated with a ProductSet. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist.", + "canonical": true, + "file": "product_search.get_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetProductSet", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.GetProductSet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p3beta1.ProductSet", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "GetProductSet", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.GetProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_UpdateProductSet_async", + "title": "vision updateProductSet Sample", + "origin": "API_DEFINITION", + "description": " Makes changes to a ProductSet resource. Only display_name can be updated currently. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist. * Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the request or longer than 4096 characters.", + "canonical": true, + "file": "product_search.update_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateProductSet", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.UpdateProductSet", + "async": true, + "parameters": [ + { + "name": "product_set", + "type": ".google.cloud.vision.v1p3beta1.ProductSet" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.vision.v1p3beta1.ProductSet", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "UpdateProductSet", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.UpdateProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_DeleteProductSet_async", + "title": "vision deleteProductSet Sample", + "origin": "API_DEFINITION", + "description": " Permanently deletes a ProductSet. All Products and ReferenceImages in the ProductSet will be deleted. The actual image files are not deleted from Google Cloud Storage. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist.", + "canonical": true, + "file": "product_search.delete_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteProductSet", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.DeleteProductSet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "DeleteProductSet", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.DeleteProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_CreateProduct_async", + "title": "vision createProduct Sample", + "origin": "API_DEFINITION", + "description": " Creates and returns a new product resource. Possible errors: * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. * Returns INVALID_ARGUMENT if description is longer than 4096 characters. * Returns INVALID_ARGUMENT if product_category is missing or invalid.", + "canonical": true, + "file": "product_search.create_product.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateProduct", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.CreateProduct", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "product", + "type": ".google.cloud.vision.v1p3beta1.Product" + }, + { + "name": "product_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p3beta1.Product", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "CreateProduct", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.CreateProduct", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_ListProducts_async", + "title": "vision listProducts Sample", + "origin": "API_DEFINITION", + "description": " Lists products in an unspecified order. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.", + "canonical": true, + "file": "product_search.list_products.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListProducts", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.ListProducts", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p3beta1.ListProductsResponse", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "ListProducts", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.ListProducts", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_GetProduct_async", + "title": "vision getProduct Sample", + "origin": "API_DEFINITION", + "description": " Gets information associated with a Product. Possible errors: * Returns NOT_FOUND if the Product does not exist.", + "canonical": true, + "file": "product_search.get_product.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetProduct", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.GetProduct", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p3beta1.Product", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "GetProduct", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.GetProduct", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_UpdateProduct_async", + "title": "vision updateProduct Sample", + "origin": "API_DEFINITION", + "description": " Makes changes to a Product resource. Only display_name, description and labels can be updated right now. If labels are updated, the change will not be reflected in queries until the next index time. Possible errors: * Returns NOT_FOUND if the Product does not exist. * Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from the request or longer than 4096 characters. * Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 characters. * Returns INVALID_ARGUMENT if product_category is present in update_mask.", + "canonical": true, + "file": "product_search.update_product.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateProduct", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.UpdateProduct", + "async": true, + "parameters": [ + { + "name": "product", + "type": ".google.cloud.vision.v1p3beta1.Product" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.vision.v1p3beta1.Product", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "UpdateProduct", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.UpdateProduct", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_DeleteProduct_async", + "title": "vision deleteProduct Sample", + "origin": "API_DEFINITION", + "description": " Permanently deletes a product and its reference images. Metadata of the product and all its images will be deleted right away, but search queries against ProductSets containing the product may still work until all related caches are refreshed. Possible errors: * Returns NOT_FOUND if the product does not exist.", + "canonical": true, + "file": "product_search.delete_product.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteProduct", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.DeleteProduct", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "DeleteProduct", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.DeleteProduct", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_CreateReferenceImage_async", + "title": "vision createReferenceImage Sample", + "origin": "API_DEFINITION", + "description": " Creates and returns a new ReferenceImage resource. The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will try to detect regions of interest in the image that are compatible with the product_category on the parent product. If it is specified, detection is ALWAYS skipped. The system converts polygons into non-rotated rectangles. Note that the pipeline will resize the image if the image resolution is too large to process (above 50MP). Possible errors: * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. * Returns INVALID_ARGUMENT if the product does not exist. * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with the parent product's product_category is detected. * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.", + "canonical": true, + "file": "product_search.create_reference_image.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateReferenceImage", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.CreateReferenceImage", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "reference_image", + "type": ".google.cloud.vision.v1p3beta1.ReferenceImage" + }, + { + "name": "reference_image_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p3beta1.ReferenceImage", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "CreateReferenceImage", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.CreateReferenceImage", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_DeleteReferenceImage_async", + "title": "vision deleteReferenceImage Sample", + "origin": "API_DEFINITION", + "description": " Permanently deletes a reference image. The image metadata will be deleted right away, but search queries against ProductSets containing the image may still work until all related caches are refreshed. The actual image files are not deleted from Google Cloud Storage. Possible errors: * Returns NOT_FOUND if the reference image does not exist.", + "canonical": true, + "file": "product_search.delete_reference_image.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteReferenceImage", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.DeleteReferenceImage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "DeleteReferenceImage", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.DeleteReferenceImage", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_ListReferenceImages_async", + "title": "vision listReferenceImages Sample", + "origin": "API_DEFINITION", + "description": " Lists reference images. Possible errors: * Returns NOT_FOUND if the parent product does not exist. * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1.", + "canonical": true, + "file": "product_search.list_reference_images.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReferenceImages", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.ListReferenceImages", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p3beta1.ListReferenceImagesResponse", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "ListReferenceImages", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.ListReferenceImages", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_GetReferenceImage_async", + "title": "vision getReferenceImage Sample", + "origin": "API_DEFINITION", + "description": " Gets information associated with a ReferenceImage. Possible errors: * Returns NOT_FOUND if the specified image does not exist.", + "canonical": true, + "file": "product_search.get_reference_image.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetReferenceImage", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.GetReferenceImage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p3beta1.ReferenceImage", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "GetReferenceImage", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.GetReferenceImage", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_AddProductToProductSet_async", + "title": "vision addProductToProductSet Sample", + "origin": "API_DEFINITION", + "description": " Adds a Product to the specified ProductSet. If the Product is already present, no change is made. One Product can be added to at most 100 ProductSets. Possible errors: * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.", + "canonical": true, + "file": "product_search.add_product_to_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AddProductToProductSet", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.AddProductToProductSet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "product", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "AddProductToProductSet", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.AddProductToProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_RemoveProductFromProductSet_async", + "title": "vision removeProductFromProductSet Sample", + "origin": "API_DEFINITION", + "description": " Removes a Product from the specified ProductSet. Possible errors: * Returns NOT_FOUND If the Product is not found under the ProductSet.", + "canonical": true, + "file": "product_search.remove_product_from_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveProductFromProductSet", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.RemoveProductFromProductSet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "product", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "RemoveProductFromProductSet", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.RemoveProductFromProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_ListProductsInProductSet_async", + "title": "vision listProductsInProductSet Sample", + "origin": "API_DEFINITION", + "description": " Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, the products field of the response will be empty. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.", + "canonical": true, + "file": "product_search.list_products_in_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListProductsInProductSet", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.ListProductsInProductSet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "ListProductsInProductSet", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.ListProductsInProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p3beta1_generated_ProductSearch_ImportProductSets_async", + "title": "vision importProductSets Sample", + "origin": "API_DEFINITION", + "description": " Asynchronous API that imports a list of reference images to specified product sets based on a list of image information. The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the progress and results of the request. `Operation.metadata` contains `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. (results) The input source of this method is a csv file on Google Cloud Storage. For the format of the csv file please see [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.csv_file_uri].", + "canonical": true, + "file": "product_search.import_product_sets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ImportProductSets", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.ImportProductSets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "input_config", + "type": ".google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearchClient" + }, + "method": { + "shortName": "ImportProductSets", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch.ImportProductSets", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p3beta1.ProductSearch" + } + } + } + } + ] +} diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/image_annotator.async_batch_annotate_files.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/image_annotator.async_batch_annotate_files.js index 1ae299e96ae..b0e97198432 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/image_annotator.async_batch_annotate_files.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/image_annotator.async_batch_annotate_files.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/image_annotator.async_batch_annotate_images.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/image_annotator.async_batch_annotate_images.js index bea6b7413a8..967c01df35a 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/image_annotator.async_batch_annotate_images.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/image_annotator.async_batch_annotate_images.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/image_annotator.batch_annotate_files.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/image_annotator.batch_annotate_files.js index 9300ed7acdf..2f03ebe3d04 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/image_annotator.batch_annotate_files.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/image_annotator.batch_annotate_files.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/image_annotator.batch_annotate_images.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/image_annotator.batch_annotate_images.js index f5c45de51eb..3b3d030d270 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/image_annotator.batch_annotate_images.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/image_annotator.batch_annotate_images.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.add_product_to_product_set.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.add_product_to_product_set.js index c1a8a1d3a8b..d3cdf6e8862 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.add_product_to_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.add_product_to_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.create_product.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.create_product.js index 6ff91a3d9aa..95a6e8fad0f 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.create_product.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.create_product.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.create_product_set.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.create_product_set.js index 5a7b268aa93..ae849604135 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.create_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.create_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.create_reference_image.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.create_reference_image.js index ea61ea034d7..2dc52217ada 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.create_reference_image.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.create_reference_image.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.delete_product.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.delete_product.js index a075f049b28..94375710e2a 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.delete_product.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.delete_product.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.delete_product_set.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.delete_product_set.js index d940858e4c3..06c598bd5bc 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.delete_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.delete_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.delete_reference_image.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.delete_reference_image.js index f969e64e335..87f8e595bb8 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.delete_reference_image.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.delete_reference_image.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.get_product.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.get_product.js index 2d235e10f76..465d8eaf215 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.get_product.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.get_product.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.get_product_set.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.get_product_set.js index 0fc502e02fd..3a1d8098a4a 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.get_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.get_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.get_reference_image.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.get_reference_image.js index 8e5204443c8..1a2374fe095 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.get_reference_image.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.get_reference_image.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.import_product_sets.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.import_product_sets.js index a23ad14bb24..1f175664bc1 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.import_product_sets.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.import_product_sets.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.list_product_sets.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.list_product_sets.js index a8833dbcead..8976e592aba 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.list_product_sets.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.list_product_sets.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.list_products.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.list_products.js index 0f7f5b1bc38..726194cde7b 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.list_products.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.list_products.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.list_products_in_product_set.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.list_products_in_product_set.js index 8dda51b0559..8740b9d661b 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.list_products_in_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.list_products_in_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.list_reference_images.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.list_reference_images.js index a645718a43d..a1c5ccc6191 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.list_reference_images.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.list_reference_images.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.purge_products.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.purge_products.js index 24fc531c668..4bb5df02f6b 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.purge_products.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.purge_products.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.remove_product_from_product_set.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.remove_product_from_product_set.js index 74fede3febb..4d66f2535e6 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.remove_product_from_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.remove_product_from_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.update_product.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.update_product.js index 48ac7c1eb7a..e0fb4e3c6e1 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.update_product.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.update_product.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.update_product_set.js b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.update_product_set.js index 425bd4478e5..d1c80c5879b 100644 --- a/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.update_product_set.js +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/product_search.update_product_set.js @@ -1,16 +1,21 @@ -// Copyright 2021 Google LLC +// Copyright 2022 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 +// 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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + 'use strict'; diff --git a/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json new file mode 100644 index 00000000000..bc1ebcd3c5b --- /dev/null +++ b/packages/google-cloud-vision/samples/generated/v1p4beta1/snippet_metadata.google.cloud.vision.v1p4beta1.json @@ -0,0 +1,1027 @@ +{ + "clientLibrary": { + "name": "nodejs-vision", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.vision.v1p4beta1", + "version": "v1p4beta1" + } + ] + }, + "snippets": [ + { + "regionTag": "vision_v1p4beta1_generated_ImageAnnotator_BatchAnnotateImages_async", + "title": "vision batchAnnotateImages Sample", + "origin": "API_DEFINITION", + "description": " Run image detection and annotation for a batch of images.", + "canonical": true, + "file": "image_annotator.batch_annotate_images.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 50, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchAnnotateImages", + "fullName": "google.cloud.vision.v1p4beta1.ImageAnnotator.BatchAnnotateImages", + "async": true, + "parameters": [ + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse", + "client": { + "shortName": "ImageAnnotatorClient", + "fullName": "google.cloud.vision.v1p4beta1.ImageAnnotatorClient" + }, + "method": { + "shortName": "BatchAnnotateImages", + "fullName": "google.cloud.vision.v1p4beta1.ImageAnnotator.BatchAnnotateImages", + "service": { + "shortName": "ImageAnnotator", + "fullName": "google.cloud.vision.v1p4beta1.ImageAnnotator" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ImageAnnotator_BatchAnnotateFiles_async", + "title": "vision batchAnnotateFiles Sample", + "origin": "API_DEFINITION", + "description": " Service that performs image detection and annotation for a batch of files. Now only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. This service will extract at most 5 (customers can specify which 5 in AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and perform detection and annotation for each image extracted.", + "canonical": true, + "file": "image_annotator.batch_annotate_files.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BatchAnnotateFiles", + "fullName": "google.cloud.vision.v1p4beta1.ImageAnnotator.BatchAnnotateFiles", + "async": true, + "parameters": [ + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse", + "client": { + "shortName": "ImageAnnotatorClient", + "fullName": "google.cloud.vision.v1p4beta1.ImageAnnotatorClient" + }, + "method": { + "shortName": "BatchAnnotateFiles", + "fullName": "google.cloud.vision.v1p4beta1.ImageAnnotator.BatchAnnotateFiles", + "service": { + "shortName": "ImageAnnotator", + "fullName": "google.cloud.vision.v1p4beta1.ImageAnnotator" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ImageAnnotator_AsyncBatchAnnotateImages_async", + "title": "vision asyncBatchAnnotateImages Sample", + "origin": "API_DEFINITION", + "description": " Run asynchronous image detection and annotation for a list of images. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). This service will write image annotation outputs to json files in customer GCS bucket, each json file containing BatchAnnotateImagesResponse proto.", + "canonical": true, + "file": "image_annotator.async_batch_annotate_images.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 56, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AsyncBatchAnnotateImages", + "fullName": "google.cloud.vision.v1p4beta1.ImageAnnotator.AsyncBatchAnnotateImages", + "async": true, + "parameters": [ + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "output_config", + "type": ".google.cloud.vision.v1p4beta1.OutputConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ImageAnnotatorClient", + "fullName": "google.cloud.vision.v1p4beta1.ImageAnnotatorClient" + }, + "method": { + "shortName": "AsyncBatchAnnotateImages", + "fullName": "google.cloud.vision.v1p4beta1.ImageAnnotator.AsyncBatchAnnotateImages", + "service": { + "shortName": "ImageAnnotator", + "fullName": "google.cloud.vision.v1p4beta1.ImageAnnotator" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ImageAnnotator_AsyncBatchAnnotateFiles_async", + "title": "vision asyncBatchAnnotateFiles Sample", + "origin": "API_DEFINITION", + "description": " Run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).", + "canonical": true, + "file": "image_annotator.async_batch_annotate_files.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 51, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AsyncBatchAnnotateFiles", + "fullName": "google.cloud.vision.v1p4beta1.ImageAnnotator.AsyncBatchAnnotateFiles", + "async": true, + "parameters": [ + { + "name": "requests", + "type": "TYPE_MESSAGE[]" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ImageAnnotatorClient", + "fullName": "google.cloud.vision.v1p4beta1.ImageAnnotatorClient" + }, + "method": { + "shortName": "AsyncBatchAnnotateFiles", + "fullName": "google.cloud.vision.v1p4beta1.ImageAnnotator.AsyncBatchAnnotateFiles", + "service": { + "shortName": "ImageAnnotator", + "fullName": "google.cloud.vision.v1p4beta1.ImageAnnotator" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_CreateProductSet_async", + "title": "vision createProductSet Sample", + "origin": "API_DEFINITION", + "description": " Creates and returns a new ProductSet resource. Possible errors: * Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters.", + "canonical": true, + "file": "product_search.create_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateProductSet", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.CreateProductSet", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "product_set", + "type": ".google.cloud.vision.v1p4beta1.ProductSet" + }, + { + "name": "product_set_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p4beta1.ProductSet", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "CreateProductSet", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.CreateProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_ListProductSets_async", + "title": "vision listProductSets Sample", + "origin": "API_DEFINITION", + "description": " Lists ProductSets in an unspecified order. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1.", + "canonical": true, + "file": "product_search.list_product_sets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListProductSets", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.ListProductSets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p4beta1.ListProductSetsResponse", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "ListProductSets", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.ListProductSets", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_GetProductSet_async", + "title": "vision getProductSet Sample", + "origin": "API_DEFINITION", + "description": " Gets information associated with a ProductSet. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist.", + "canonical": true, + "file": "product_search.get_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetProductSet", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.GetProductSet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p4beta1.ProductSet", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "GetProductSet", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.GetProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_UpdateProductSet_async", + "title": "vision updateProductSet Sample", + "origin": "API_DEFINITION", + "description": " Makes changes to a ProductSet resource. Only display_name can be updated currently. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist. * Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the request or longer than 4096 characters.", + "canonical": true, + "file": "product_search.update_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateProductSet", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.UpdateProductSet", + "async": true, + "parameters": [ + { + "name": "product_set", + "type": ".google.cloud.vision.v1p4beta1.ProductSet" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.vision.v1p4beta1.ProductSet", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "UpdateProductSet", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.UpdateProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_DeleteProductSet_async", + "title": "vision deleteProductSet Sample", + "origin": "API_DEFINITION", + "description": " Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not deleted. The actual image files are not deleted from Google Cloud Storage.", + "canonical": true, + "file": "product_search.delete_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteProductSet", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.DeleteProductSet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "DeleteProductSet", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.DeleteProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_CreateProduct_async", + "title": "vision createProduct Sample", + "origin": "API_DEFINITION", + "description": " Creates and returns a new product resource. Possible errors: * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. * Returns INVALID_ARGUMENT if description is longer than 4096 characters. * Returns INVALID_ARGUMENT if product_category is missing or invalid.", + "canonical": true, + "file": "product_search.create_product.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateProduct", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.CreateProduct", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "product", + "type": ".google.cloud.vision.v1p4beta1.Product" + }, + { + "name": "product_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p4beta1.Product", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "CreateProduct", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.CreateProduct", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_ListProducts_async", + "title": "vision listProducts Sample", + "origin": "API_DEFINITION", + "description": " Lists products in an unspecified order. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.", + "canonical": true, + "file": "product_search.list_products.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListProducts", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.ListProducts", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p4beta1.ListProductsResponse", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "ListProducts", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.ListProducts", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_GetProduct_async", + "title": "vision getProduct Sample", + "origin": "API_DEFINITION", + "description": " Gets information associated with a Product. Possible errors: * Returns NOT_FOUND if the Product does not exist.", + "canonical": true, + "file": "product_search.get_product.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetProduct", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.GetProduct", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p4beta1.Product", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "GetProduct", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.GetProduct", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_UpdateProduct_async", + "title": "vision updateProduct Sample", + "origin": "API_DEFINITION", + "description": " Makes changes to a Product resource. Only the `display_name`, `description`, and `labels` fields can be updated right now. If labels are updated, the change will not be reflected in queries until the next index time. Possible errors: * Returns NOT_FOUND if the Product does not exist. * Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from the request or longer than 4096 characters. * Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 characters. * Returns INVALID_ARGUMENT if product_category is present in update_mask.", + "canonical": true, + "file": "product_search.update_product.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateProduct", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.UpdateProduct", + "async": true, + "parameters": [ + { + "name": "product", + "type": ".google.cloud.vision.v1p4beta1.Product" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.vision.v1p4beta1.Product", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "UpdateProduct", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.UpdateProduct", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_DeleteProduct_async", + "title": "vision deleteProduct Sample", + "origin": "API_DEFINITION", + "description": " Permanently deletes a product and its reference images. Metadata of the product and all its images will be deleted right away, but search queries against ProductSets containing the product may still work until all related caches are refreshed.", + "canonical": true, + "file": "product_search.delete_product.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteProduct", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.DeleteProduct", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "DeleteProduct", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.DeleteProduct", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_CreateReferenceImage_async", + "title": "vision createReferenceImage Sample", + "origin": "API_DEFINITION", + "description": " Creates and returns a new ReferenceImage resource. The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will try to detect regions of interest in the image that are compatible with the product_category on the parent product. If it is specified, detection is ALWAYS skipped. The system converts polygons into non-rotated rectangles. Note that the pipeline will resize the image if the image resolution is too large to process (above 50MP). Possible errors: * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. * Returns INVALID_ARGUMENT if the product does not exist. * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with the parent product's product_category is detected. * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.", + "canonical": true, + "file": "product_search.create_reference_image.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateReferenceImage", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.CreateReferenceImage", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "reference_image", + "type": ".google.cloud.vision.v1p4beta1.ReferenceImage" + }, + { + "name": "reference_image_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p4beta1.ReferenceImage", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "CreateReferenceImage", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.CreateReferenceImage", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_DeleteReferenceImage_async", + "title": "vision deleteReferenceImage Sample", + "origin": "API_DEFINITION", + "description": " Permanently deletes a reference image. The image metadata will be deleted right away, but search queries against ProductSets containing the image may still work until all related caches are refreshed. The actual image files are not deleted from Google Cloud Storage.", + "canonical": true, + "file": "product_search.delete_reference_image.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteReferenceImage", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.DeleteReferenceImage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "DeleteReferenceImage", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.DeleteReferenceImage", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_ListReferenceImages_async", + "title": "vision listReferenceImages Sample", + "origin": "API_DEFINITION", + "description": " Lists reference images. Possible errors: * Returns NOT_FOUND if the parent product does not exist. * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1.", + "canonical": true, + "file": "product_search.list_reference_images.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListReferenceImages", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.ListReferenceImages", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p4beta1.ListReferenceImagesResponse", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "ListReferenceImages", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.ListReferenceImages", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_GetReferenceImage_async", + "title": "vision getReferenceImage Sample", + "origin": "API_DEFINITION", + "description": " Gets information associated with a ReferenceImage. Possible errors: * Returns NOT_FOUND if the specified image does not exist.", + "canonical": true, + "file": "product_search.get_reference_image.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetReferenceImage", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.GetReferenceImage", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p4beta1.ReferenceImage", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "GetReferenceImage", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.GetReferenceImage", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_AddProductToProductSet_async", + "title": "vision addProductToProductSet Sample", + "origin": "API_DEFINITION", + "description": " Adds a Product to the specified ProductSet. If the Product is already present, no change is made. One Product can be added to at most 100 ProductSets. Possible errors: * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.", + "canonical": true, + "file": "product_search.add_product_to_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "AddProductToProductSet", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.AddProductToProductSet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "product", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "AddProductToProductSet", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.AddProductToProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_RemoveProductFromProductSet_async", + "title": "vision removeProductFromProductSet Sample", + "origin": "API_DEFINITION", + "description": " Removes a Product from the specified ProductSet.", + "canonical": true, + "file": "product_search.remove_product_from_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RemoveProductFromProductSet", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.RemoveProductFromProductSet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "product", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "RemoveProductFromProductSet", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.RemoveProductFromProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_ListProductsInProductSet_async", + "title": "vision listProductsInProductSet Sample", + "origin": "API_DEFINITION", + "description": " Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, the products field of the response will be empty. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.", + "canonical": true, + "file": "product_search.list_products_in_product_set.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 62, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListProductsInProductSet", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.ListProductsInProductSet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "ListProductsInProductSet", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.ListProductsInProductSet", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_ImportProductSets_async", + "title": "vision importProductSets Sample", + "origin": "API_DEFINITION", + "description": " Asynchronous API that imports a list of reference images to specified product sets based on a list of image information. The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the progress and results of the request. `Operation.metadata` contains `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. (results) The input source of this method is a csv file on Google Cloud Storage. For the format of the csv file please see [ImportProductSetsGcsSource.csv_file_uri][google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.csv_file_uri].", + "canonical": true, + "file": "product_search.import_product_sets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ImportProductSets", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.ImportProductSets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "input_config", + "type": ".google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "ImportProductSets", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.ImportProductSets", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + }, + { + "regionTag": "vision_v1p4beta1_generated_ProductSearch_PurgeProducts_async", + "title": "vision purgeProducts Sample", + "origin": "API_DEFINITION", + "description": " Asynchronous API to delete all Products in a ProductSet or all Products that are in no ProductSet. If a Product is a member of the specified ProductSet in addition to other ProductSets, the Product will still be deleted. It is recommended to not delete the specified ProductSet until after this operation has completed. It is also recommended to not add any of the Products involved in the batch delete to a new ProductSet while this operation is running because those Products may still end up deleted. It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep the csv files used in ImportProductSets (if that was how you originally built the Product Set) before starting PurgeProducts, in case you need to re-import the data after deletion. If the plan is to purge all of the Products from a ProductSet and then re-use the empty ProductSet to re-import new Products into the empty ProductSet, you must wait until the PurgeProducts operation has finished for that ProductSet. The [google.longrunning.Operation][google.longrunning.Operation] API can be used to keep track of the progress and results of the request. `Operation.metadata` contains `BatchOperationMetadata`. (progress)", + "canonical": true, + "file": "product_search.purge_products.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PurgeProducts", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.PurgeProducts", + "async": true, + "parameters": [ + { + "name": "product_set_purge_config", + "type": ".google.cloud.vision.v1p4beta1.ProductSetPurgeConfig" + }, + { + "name": "delete_orphan_products", + "type": "TYPE_BOOL" + }, + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ProductSearchClient", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearchClient" + }, + "method": { + "shortName": "PurgeProducts", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch.PurgeProducts", + "service": { + "shortName": "ProductSearch", + "fullName": "google.cloud.vision.v1p4beta1.ProductSearch" + } + } + } + } + ] +} diff --git a/packages/google-cloud-vision/src/v1/image_annotator_client.ts b/packages/google-cloud-vision/src/v1/image_annotator_client.ts index 7202c2cd72a..946012aed0b 100644 --- a/packages/google-cloud-vision/src/v1/image_annotator_client.ts +++ b/packages/google-cloud-vision/src/v1/image_annotator_client.ts @@ -1086,9 +1086,8 @@ export class ImageAnnotatorClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.imageAnnotatorStub!.then(stub => { + if (this.imageAnnotatorStub && !this._terminated) { + return this.imageAnnotatorStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/packages/google-cloud-vision/src/v1/product_search_client.ts b/packages/google-cloud-vision/src/v1/product_search_client.ts index 1051451f454..caad898810e 100644 --- a/packages/google-cloud-vision/src/v1/product_search_client.ts +++ b/packages/google-cloud-vision/src/v1/product_search_client.ts @@ -3076,9 +3076,8 @@ export class ProductSearchClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.productSearchStub!.then(stub => { + if (this.productSearchStub && !this._terminated) { + return this.productSearchStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/packages/google-cloud-vision/src/v1p1beta1/image_annotator_client.ts b/packages/google-cloud-vision/src/v1p1beta1/image_annotator_client.ts index f75cf3ac8b1..9bd68d7476f 100644 --- a/packages/google-cloud-vision/src/v1p1beta1/image_annotator_client.ts +++ b/packages/google-cloud-vision/src/v1p1beta1/image_annotator_client.ts @@ -387,9 +387,8 @@ export class ImageAnnotatorClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.imageAnnotatorStub!.then(stub => { + if (this.imageAnnotatorStub && !this._terminated) { + return this.imageAnnotatorStub.then(stub => { this._terminated = true; stub.close(); }); diff --git a/packages/google-cloud-vision/src/v1p2beta1/image_annotator_client.ts b/packages/google-cloud-vision/src/v1p2beta1/image_annotator_client.ts index 6405f443d02..5064ae7dc82 100644 --- a/packages/google-cloud-vision/src/v1p2beta1/image_annotator_client.ts +++ b/packages/google-cloud-vision/src/v1p2beta1/image_annotator_client.ts @@ -571,9 +571,8 @@ export class ImageAnnotatorClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.imageAnnotatorStub!.then(stub => { + if (this.imageAnnotatorStub && !this._terminated) { + return this.imageAnnotatorStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/packages/google-cloud-vision/src/v1p3beta1/image_annotator_client.ts b/packages/google-cloud-vision/src/v1p3beta1/image_annotator_client.ts index 2b4e0be3318..27484b5e3b7 100644 --- a/packages/google-cloud-vision/src/v1p3beta1/image_annotator_client.ts +++ b/packages/google-cloud-vision/src/v1p3beta1/image_annotator_client.ts @@ -766,9 +766,8 @@ export class ImageAnnotatorClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.imageAnnotatorStub!.then(stub => { + if (this.imageAnnotatorStub && !this._terminated) { + return this.imageAnnotatorStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/packages/google-cloud-vision/src/v1p3beta1/product_search_client.ts b/packages/google-cloud-vision/src/v1p3beta1/product_search_client.ts index f28d4e51cb5..97f649ac3d4 100644 --- a/packages/google-cloud-vision/src/v1p3beta1/product_search_client.ts +++ b/packages/google-cloud-vision/src/v1p3beta1/product_search_client.ts @@ -2997,9 +2997,8 @@ export class ProductSearchClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.productSearchStub!.then(stub => { + if (this.productSearchStub && !this._terminated) { + return this.productSearchStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/packages/google-cloud-vision/src/v1p4beta1/image_annotator_client.ts b/packages/google-cloud-vision/src/v1p4beta1/image_annotator_client.ts index d45e1363403..b91375b9cae 100644 --- a/packages/google-cloud-vision/src/v1p4beta1/image_annotator_client.ts +++ b/packages/google-cloud-vision/src/v1p4beta1/image_annotator_client.ts @@ -1030,9 +1030,8 @@ export class ImageAnnotatorClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.imageAnnotatorStub!.then(stub => { + if (this.imageAnnotatorStub && !this._terminated) { + return this.imageAnnotatorStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/packages/google-cloud-vision/src/v1p4beta1/product_search_client.ts b/packages/google-cloud-vision/src/v1p4beta1/product_search_client.ts index 89fdab0896d..3e8e3479b34 100644 --- a/packages/google-cloud-vision/src/v1p4beta1/product_search_client.ts +++ b/packages/google-cloud-vision/src/v1p4beta1/product_search_client.ts @@ -3170,9 +3170,8 @@ export class ProductSearchClient { * @returns {Promise} A promise that resolves when the client is closed. */ close(): Promise { - this.initialize(); - if (!this._terminated) { - return this.productSearchStub!.then(stub => { + if (this.productSearchStub && !this._terminated) { + return this.productSearchStub.then(stub => { this._terminated = true; stub.close(); this.operationsClient.close(); diff --git a/packages/google-cloud-vision/test/gapic_image_annotator_v1.ts b/packages/google-cloud-vision/test/gapic_image_annotator_v1.ts index 941bb6e5751..5afc6d67cff 100644 --- a/packages/google-cloud-vision/test/gapic_image_annotator_v1.ts +++ b/packages/google-cloud-vision/test/gapic_image_annotator_v1.ts @@ -122,12 +122,27 @@ describe('v1.ImageAnnotatorClient', () => { assert(client.imageAnnotatorStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new imageannotatorModule.v1.ImageAnnotatorClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.imageAnnotatorStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new imageannotatorModule.v1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageAnnotatorStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -274,6 +289,22 @@ describe('v1.ImageAnnotatorClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes batchAnnotateImages with closed client', async () => { + const client = new imageannotatorModule.v1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1.BatchAnnotateImagesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.batchAnnotateImages(request), expectedError); + }); }); describe('batchAnnotateFiles', () => { @@ -386,6 +417,22 @@ describe('v1.ImageAnnotatorClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes batchAnnotateFiles with closed client', async () => { + const client = new imageannotatorModule.v1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1.BatchAnnotateFilesRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.batchAnnotateFiles(request), expectedError); + }); }); describe('asyncBatchAnnotateImages', () => { diff --git a/packages/google-cloud-vision/test/gapic_image_annotator_v1p1beta1.ts b/packages/google-cloud-vision/test/gapic_image_annotator_v1p1beta1.ts index 60ecb9137c5..e04323ac50a 100644 --- a/packages/google-cloud-vision/test/gapic_image_annotator_v1p1beta1.ts +++ b/packages/google-cloud-vision/test/gapic_image_annotator_v1p1beta1.ts @@ -90,12 +90,27 @@ describe('v1p1beta1.ImageAnnotatorClient', () => { assert(client.imageAnnotatorStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new imageannotatorModule.v1p1beta1.ImageAnnotatorClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.imageAnnotatorStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new imageannotatorModule.v1p1beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageAnnotatorStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -218,5 +233,19 @@ describe('v1p1beta1.ImageAnnotatorClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes batchAnnotateImages with closed client', async () => { + const client = new imageannotatorModule.v1p1beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.batchAnnotateImages(request), expectedError); + }); }); }); diff --git a/packages/google-cloud-vision/test/gapic_image_annotator_v1p2beta1.ts b/packages/google-cloud-vision/test/gapic_image_annotator_v1p2beta1.ts index f763d8c53ef..8a6c1b74b2a 100644 --- a/packages/google-cloud-vision/test/gapic_image_annotator_v1p2beta1.ts +++ b/packages/google-cloud-vision/test/gapic_image_annotator_v1p2beta1.ts @@ -122,12 +122,27 @@ describe('v1p2beta1.ImageAnnotatorClient', () => { assert(client.imageAnnotatorStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new imageannotatorModule.v1p2beta1.ImageAnnotatorClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.imageAnnotatorStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new imageannotatorModule.v1p2beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageAnnotatorStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -250,6 +265,20 @@ describe('v1p2beta1.ImageAnnotatorClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes batchAnnotateImages with closed client', async () => { + const client = new imageannotatorModule.v1p2beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.batchAnnotateImages(request), expectedError); + }); }); describe('asyncBatchAnnotateFiles', () => { diff --git a/packages/google-cloud-vision/test/gapic_image_annotator_v1p3beta1.ts b/packages/google-cloud-vision/test/gapic_image_annotator_v1p3beta1.ts index ebbd20bd833..15f411f11f3 100644 --- a/packages/google-cloud-vision/test/gapic_image_annotator_v1p3beta1.ts +++ b/packages/google-cloud-vision/test/gapic_image_annotator_v1p3beta1.ts @@ -122,12 +122,27 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { assert(client.imageAnnotatorStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new imageannotatorModule.v1p3beta1.ImageAnnotatorClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.imageAnnotatorStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new imageannotatorModule.v1p3beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageAnnotatorStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -250,6 +265,20 @@ describe('v1p3beta1.ImageAnnotatorClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes batchAnnotateImages with closed client', async () => { + const client = new imageannotatorModule.v1p3beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.batchAnnotateImages(request), expectedError); + }); }); describe('asyncBatchAnnotateFiles', () => { diff --git a/packages/google-cloud-vision/test/gapic_image_annotator_v1p4beta1.ts b/packages/google-cloud-vision/test/gapic_image_annotator_v1p4beta1.ts index 3c2a8ea5632..408383fb73f 100644 --- a/packages/google-cloud-vision/test/gapic_image_annotator_v1p4beta1.ts +++ b/packages/google-cloud-vision/test/gapic_image_annotator_v1p4beta1.ts @@ -122,12 +122,27 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { assert(client.imageAnnotatorStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.imageAnnotatorStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageAnnotatorStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -250,6 +265,20 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes batchAnnotateImages with closed client', async () => { + const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.batchAnnotateImages(request), expectedError); + }); }); describe('batchAnnotateFiles', () => { @@ -338,6 +367,20 @@ describe('v1p4beta1.ImageAnnotatorClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes batchAnnotateFiles with closed client', async () => { + const client = new imageannotatorModule.v1p4beta1.ImageAnnotatorClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest() + ); + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.batchAnnotateFiles(request), expectedError); + }); }); describe('asyncBatchAnnotateImages', () => { diff --git a/packages/google-cloud-vision/test/gapic_product_search_v1.ts b/packages/google-cloud-vision/test/gapic_product_search_v1.ts index d880e130653..b0ee2602fbe 100644 --- a/packages/google-cloud-vision/test/gapic_product_search_v1.ts +++ b/packages/google-cloud-vision/test/gapic_product_search_v1.ts @@ -183,12 +183,27 @@ describe('v1.ProductSearchClient', () => { assert(client.productSearchStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new productsearchModule.v1.ProductSearchClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.productSearchStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.productSearchStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -334,6 +349,22 @@ describe('v1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createProductSet with closed client', async () => { + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1.CreateProductSetRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createProductSet(request), expectedError); + }); }); describe('getProductSet', () => { @@ -445,6 +476,22 @@ describe('v1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getProductSet with closed client', async () => { + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1.GetProductSetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getProductSet(request), expectedError); + }); }); describe('updateProductSet', () => { @@ -559,6 +606,23 @@ describe('v1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateProductSet with closed client', async () => { + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1.UpdateProductSetRequest() + ); + request.productSet = {}; + request.productSet.name = ''; + const expectedHeaderRequestParams = 'product_set.name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateProductSet(request), expectedError); + }); }); describe('deleteProductSet', () => { @@ -670,6 +734,22 @@ describe('v1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteProductSet with closed client', async () => { + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1.DeleteProductSetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteProductSet(request), expectedError); + }); }); describe('createProduct', () => { @@ -781,6 +861,22 @@ describe('v1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createProduct with closed client', async () => { + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1.CreateProductRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createProduct(request), expectedError); + }); }); describe('getProduct', () => { @@ -892,6 +988,22 @@ describe('v1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getProduct with closed client', async () => { + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1.GetProductRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getProduct(request), expectedError); + }); }); describe('updateProduct', () => { @@ -1006,6 +1118,23 @@ describe('v1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateProduct with closed client', async () => { + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1.UpdateProductRequest() + ); + request.product = {}; + request.product.name = ''; + const expectedHeaderRequestParams = 'product.name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateProduct(request), expectedError); + }); }); describe('deleteProduct', () => { @@ -1117,6 +1246,22 @@ describe('v1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteProduct with closed client', async () => { + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1.DeleteProductRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteProduct(request), expectedError); + }); }); describe('createReferenceImage', () => { @@ -1229,6 +1374,22 @@ describe('v1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createReferenceImage with closed client', async () => { + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1.CreateReferenceImageRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createReferenceImage(request), expectedError); + }); }); describe('deleteReferenceImage', () => { @@ -1341,6 +1502,22 @@ describe('v1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteReferenceImage with closed client', async () => { + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1.DeleteReferenceImageRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteReferenceImage(request), expectedError); + }); }); describe('getReferenceImage', () => { @@ -1452,6 +1629,22 @@ describe('v1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getReferenceImage with closed client', async () => { + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1.GetReferenceImageRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getReferenceImage(request), expectedError); + }); }); describe('addProductToProductSet', () => { @@ -1567,6 +1760,25 @@ describe('v1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes addProductToProductSet with closed client', async () => { + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1.AddProductToProductSetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.addProductToProductSet(request), + expectedError + ); + }); }); describe('removeProductFromProductSet', () => { @@ -1682,6 +1894,25 @@ describe('v1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes removeProductFromProductSet with closed client', async () => { + const client = new productsearchModule.v1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1.RemoveProductFromProductSetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.removeProductFromProductSet(request), + expectedError + ); + }); }); describe('importProductSets', () => { diff --git a/packages/google-cloud-vision/test/gapic_product_search_v1p3beta1.ts b/packages/google-cloud-vision/test/gapic_product_search_v1p3beta1.ts index ed8f09ef068..dbe5095a104 100644 --- a/packages/google-cloud-vision/test/gapic_product_search_v1p3beta1.ts +++ b/packages/google-cloud-vision/test/gapic_product_search_v1p3beta1.ts @@ -185,12 +185,27 @@ describe('v1p3beta1.ProductSearchClient', () => { assert(client.productSearchStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new productsearchModule.v1p3beta1.ProductSearchClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.productSearchStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.productSearchStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -336,6 +351,22 @@ describe('v1p3beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createProductSet with closed client', async () => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p3beta1.CreateProductSetRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createProductSet(request), expectedError); + }); }); describe('getProductSet', () => { @@ -447,6 +478,22 @@ describe('v1p3beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getProductSet with closed client', async () => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p3beta1.GetProductSetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getProductSet(request), expectedError); + }); }); describe('updateProductSet', () => { @@ -561,6 +608,23 @@ describe('v1p3beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateProductSet with closed client', async () => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p3beta1.UpdateProductSetRequest() + ); + request.productSet = {}; + request.productSet.name = ''; + const expectedHeaderRequestParams = 'product_set.name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateProductSet(request), expectedError); + }); }); describe('deleteProductSet', () => { @@ -672,6 +736,22 @@ describe('v1p3beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteProductSet with closed client', async () => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p3beta1.DeleteProductSetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteProductSet(request), expectedError); + }); }); describe('createProduct', () => { @@ -783,6 +863,22 @@ describe('v1p3beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createProduct with closed client', async () => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p3beta1.CreateProductRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createProduct(request), expectedError); + }); }); describe('getProduct', () => { @@ -894,6 +990,22 @@ describe('v1p3beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getProduct with closed client', async () => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p3beta1.GetProductRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getProduct(request), expectedError); + }); }); describe('updateProduct', () => { @@ -1008,6 +1120,23 @@ describe('v1p3beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateProduct with closed client', async () => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p3beta1.UpdateProductRequest() + ); + request.product = {}; + request.product.name = ''; + const expectedHeaderRequestParams = 'product.name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateProduct(request), expectedError); + }); }); describe('deleteProduct', () => { @@ -1119,6 +1248,22 @@ describe('v1p3beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteProduct with closed client', async () => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p3beta1.DeleteProductRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteProduct(request), expectedError); + }); }); describe('createReferenceImage', () => { @@ -1231,6 +1376,22 @@ describe('v1p3beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createReferenceImage with closed client', async () => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createReferenceImage(request), expectedError); + }); }); describe('deleteReferenceImage', () => { @@ -1343,6 +1504,22 @@ describe('v1p3beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteReferenceImage with closed client', async () => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteReferenceImage(request), expectedError); + }); }); describe('getReferenceImage', () => { @@ -1454,6 +1631,22 @@ describe('v1p3beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getReferenceImage with closed client', async () => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p3beta1.GetReferenceImageRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getReferenceImage(request), expectedError); + }); }); describe('addProductToProductSet', () => { @@ -1569,6 +1762,25 @@ describe('v1p3beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes addProductToProductSet with closed client', async () => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.addProductToProductSet(request), + expectedError + ); + }); }); describe('removeProductFromProductSet', () => { @@ -1684,6 +1896,25 @@ describe('v1p3beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes removeProductFromProductSet with closed client', async () => { + const client = new productsearchModule.v1p3beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.removeProductFromProductSet(request), + expectedError + ); + }); }); describe('importProductSets', () => { diff --git a/packages/google-cloud-vision/test/gapic_product_search_v1p4beta1.ts b/packages/google-cloud-vision/test/gapic_product_search_v1p4beta1.ts index 0bb24a0db33..1afeea71d1e 100644 --- a/packages/google-cloud-vision/test/gapic_product_search_v1p4beta1.ts +++ b/packages/google-cloud-vision/test/gapic_product_search_v1p4beta1.ts @@ -185,12 +185,27 @@ describe('v1p4beta1.ProductSearchClient', () => { assert(client.productSearchStub); }); - it('has close method', () => { + it('has close method for the initialized client', done => { const client = new productsearchModule.v1p4beta1.ProductSearchClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); - client.close(); + client.initialize(); + assert(client.productSearchStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.productSearchStub, undefined); + client.close().then(() => { + done(); + }); }); it('has getProjectId method', async () => { @@ -336,6 +351,22 @@ describe('v1p4beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createProductSet with closed client', async () => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p4beta1.CreateProductSetRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createProductSet(request), expectedError); + }); }); describe('getProductSet', () => { @@ -447,6 +478,22 @@ describe('v1p4beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getProductSet with closed client', async () => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p4beta1.GetProductSetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getProductSet(request), expectedError); + }); }); describe('updateProductSet', () => { @@ -561,6 +608,23 @@ describe('v1p4beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateProductSet with closed client', async () => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p4beta1.UpdateProductSetRequest() + ); + request.productSet = {}; + request.productSet.name = ''; + const expectedHeaderRequestParams = 'product_set.name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateProductSet(request), expectedError); + }); }); describe('deleteProductSet', () => { @@ -672,6 +736,22 @@ describe('v1p4beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteProductSet with closed client', async () => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p4beta1.DeleteProductSetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteProductSet(request), expectedError); + }); }); describe('createProduct', () => { @@ -783,6 +863,22 @@ describe('v1p4beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createProduct with closed client', async () => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p4beta1.CreateProductRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createProduct(request), expectedError); + }); }); describe('getProduct', () => { @@ -894,6 +990,22 @@ describe('v1p4beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getProduct with closed client', async () => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p4beta1.GetProductRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getProduct(request), expectedError); + }); }); describe('updateProduct', () => { @@ -1008,6 +1120,23 @@ describe('v1p4beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes updateProduct with closed client', async () => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p4beta1.UpdateProductRequest() + ); + request.product = {}; + request.product.name = ''; + const expectedHeaderRequestParams = 'product.name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateProduct(request), expectedError); + }); }); describe('deleteProduct', () => { @@ -1119,6 +1248,22 @@ describe('v1p4beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteProduct with closed client', async () => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p4beta1.DeleteProductRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteProduct(request), expectedError); + }); }); describe('createReferenceImage', () => { @@ -1231,6 +1376,22 @@ describe('v1p4beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes createReferenceImage with closed client', async () => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest() + ); + request.parent = ''; + const expectedHeaderRequestParams = 'parent='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createReferenceImage(request), expectedError); + }); }); describe('deleteReferenceImage', () => { @@ -1343,6 +1504,22 @@ describe('v1p4beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes deleteReferenceImage with closed client', async () => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteReferenceImage(request), expectedError); + }); }); describe('getReferenceImage', () => { @@ -1454,6 +1631,22 @@ describe('v1p4beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes getReferenceImage with closed client', async () => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p4beta1.GetReferenceImageRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getReferenceImage(request), expectedError); + }); }); describe('addProductToProductSet', () => { @@ -1569,6 +1762,25 @@ describe('v1p4beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes addProductToProductSet with closed client', async () => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.addProductToProductSet(request), + expectedError + ); + }); }); describe('removeProductFromProductSet', () => { @@ -1684,6 +1896,25 @@ describe('v1p4beta1.ProductSearchClient', () => { .calledWith(request, expectedOptions, undefined) ); }); + + it('invokes removeProductFromProductSet with closed client', async () => { + const client = new productsearchModule.v1p4beta1.ProductSearchClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest() + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.removeProductFromProductSet(request), + expectedError + ); + }); }); describe('importProductSets', () => {