ProductSearch

google.cloud.vision.v1p4beta1. ProductSearch

Represents a ProductSearch

Constructor

new ProductSearch(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new ProductSearch service.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Extends

  • $protobuf.rpc.Service

Methods

addProductToProductSet(request, callback) → {undefined}

Calls AddProductToProductSet.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IAddProductToProductSetRequest

AddProductToProductSetRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.AddProductToProductSetCallback

Node-style callback called with the error, if any, and Empty

Returns:
Type Description
undefined

addProductToProductSet(request) → {Promise.<google.protobuf.Empty>}

Calls AddProductToProductSet.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IAddProductToProductSetRequest

AddProductToProductSetRequest message or plain object

Returns:
Type Description
Promise.<google.protobuf.Empty>

Promise

createProduct(request, callback) → {undefined}

Calls CreateProduct.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.ICreateProductRequest

CreateProductRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.CreateProductCallback

Node-style callback called with the error, if any, and Product

Returns:
Type Description
undefined

createProduct(request) → {Promise.<google.cloud.vision.v1p4beta1.Product>}

Calls CreateProduct.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.ICreateProductRequest

CreateProductRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.vision.v1p4beta1.Product>

Promise

createProductSet(request, callback) → {undefined}

Calls CreateProductSet.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.ICreateProductSetRequest

CreateProductSetRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.CreateProductSetCallback

Node-style callback called with the error, if any, and ProductSet

Returns:
Type Description
undefined

createProductSet(request) → {Promise.<google.cloud.vision.v1p4beta1.ProductSet>}

Calls CreateProductSet.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.ICreateProductSetRequest

CreateProductSetRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.vision.v1p4beta1.ProductSet>

Promise

createReferenceImage(request, callback) → {undefined}

Calls CreateReferenceImage.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.ICreateReferenceImageRequest

CreateReferenceImageRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.CreateReferenceImageCallback

Node-style callback called with the error, if any, and ReferenceImage

Returns:
Type Description
undefined

createReferenceImage(request) → {Promise.<google.cloud.vision.v1p4beta1.ReferenceImage>}

Calls CreateReferenceImage.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.ICreateReferenceImageRequest

CreateReferenceImageRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.vision.v1p4beta1.ReferenceImage>

Promise

deleteProduct(request, callback) → {undefined}

Calls DeleteProduct.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IDeleteProductRequest

DeleteProductRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.DeleteProductCallback

Node-style callback called with the error, if any, and Empty

Returns:
Type Description
undefined

deleteProduct(request) → {Promise.<google.protobuf.Empty>}

Calls DeleteProduct.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IDeleteProductRequest

DeleteProductRequest message or plain object

Returns:
Type Description
Promise.<google.protobuf.Empty>

Promise

deleteProductSet(request, callback) → {undefined}

Calls DeleteProductSet.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IDeleteProductSetRequest

DeleteProductSetRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.DeleteProductSetCallback

Node-style callback called with the error, if any, and Empty

Returns:
Type Description
undefined

deleteProductSet(request) → {Promise.<google.protobuf.Empty>}

Calls DeleteProductSet.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IDeleteProductSetRequest

DeleteProductSetRequest message or plain object

Returns:
Type Description
Promise.<google.protobuf.Empty>

Promise

deleteReferenceImage(request, callback) → {undefined}

Calls DeleteReferenceImage.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IDeleteReferenceImageRequest

DeleteReferenceImageRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.DeleteReferenceImageCallback

Node-style callback called with the error, if any, and Empty

Returns:
Type Description
undefined

deleteReferenceImage(request) → {Promise.<google.protobuf.Empty>}

Calls DeleteReferenceImage.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IDeleteReferenceImageRequest

DeleteReferenceImageRequest message or plain object

Returns:
Type Description
Promise.<google.protobuf.Empty>

Promise

getProduct(request, callback) → {undefined}

Calls GetProduct.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IGetProductRequest

GetProductRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.GetProductCallback

Node-style callback called with the error, if any, and Product

Returns:
Type Description
undefined

getProduct(request) → {Promise.<google.cloud.vision.v1p4beta1.Product>}

Calls GetProduct.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IGetProductRequest

GetProductRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.vision.v1p4beta1.Product>

Promise

getProductSet(request, callback) → {undefined}

Calls GetProductSet.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IGetProductSetRequest

GetProductSetRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.GetProductSetCallback

Node-style callback called with the error, if any, and ProductSet

Returns:
Type Description
undefined

getProductSet(request) → {Promise.<google.cloud.vision.v1p4beta1.ProductSet>}

Calls GetProductSet.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IGetProductSetRequest

GetProductSetRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.vision.v1p4beta1.ProductSet>

Promise

getReferenceImage(request, callback) → {undefined}

Calls GetReferenceImage.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IGetReferenceImageRequest

GetReferenceImageRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.GetReferenceImageCallback

Node-style callback called with the error, if any, and ReferenceImage

Returns:
Type Description
undefined

getReferenceImage(request) → {Promise.<google.cloud.vision.v1p4beta1.ReferenceImage>}

Calls GetReferenceImage.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IGetReferenceImageRequest

GetReferenceImageRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.vision.v1p4beta1.ReferenceImage>

Promise

importProductSets(request, callback) → {undefined}

Calls ImportProductSets.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IImportProductSetsRequest

ImportProductSetsRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.ImportProductSetsCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

importProductSets(request) → {Promise.<google.longrunning.Operation>}

Calls ImportProductSets.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IImportProductSetsRequest

ImportProductSetsRequest message or plain object

Returns:
Type Description
Promise.<google.longrunning.Operation>

Promise

listProductSets(request, callback) → {undefined}

Calls ListProductSets.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IListProductSetsRequest

ListProductSetsRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.ListProductSetsCallback

Node-style callback called with the error, if any, and ListProductSetsResponse

Returns:
Type Description
undefined

listProductSets(request) → {Promise.<google.cloud.vision.v1p4beta1.ListProductSetsResponse>}

Calls ListProductSets.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IListProductSetsRequest

ListProductSetsRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.vision.v1p4beta1.ListProductSetsResponse>

Promise

listProducts(request, callback) → {undefined}

Calls ListProducts.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IListProductsRequest

ListProductsRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.ListProductsCallback

Node-style callback called with the error, if any, and ListProductsResponse

Returns:
Type Description
undefined

listProducts(request) → {Promise.<google.cloud.vision.v1p4beta1.ListProductsResponse>}

Calls ListProducts.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IListProductsRequest

ListProductsRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.vision.v1p4beta1.ListProductsResponse>

Promise

listProductsInProductSet(request, callback) → {undefined}

Calls ListProductsInProductSet.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IListProductsInProductSetRequest

ListProductsInProductSetRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.ListProductsInProductSetCallback

Node-style callback called with the error, if any, and ListProductsInProductSetResponse

Returns:
Type Description
undefined

listProductsInProductSet(request) → {Promise.<google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse>}

Calls ListProductsInProductSet.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IListProductsInProductSetRequest

ListProductsInProductSetRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse>

Promise

listReferenceImages(request, callback) → {undefined}

Calls ListReferenceImages.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IListReferenceImagesRequest

ListReferenceImagesRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.ListReferenceImagesCallback

Node-style callback called with the error, if any, and ListReferenceImagesResponse

Returns:
Type Description
undefined

listReferenceImages(request) → {Promise.<google.cloud.vision.v1p4beta1.ListReferenceImagesResponse>}

Calls ListReferenceImages.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IListReferenceImagesRequest

ListReferenceImagesRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.vision.v1p4beta1.ListReferenceImagesResponse>

Promise

purgeProducts(request, callback) → {undefined}

Calls PurgeProducts.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IPurgeProductsRequest

PurgeProductsRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.PurgeProductsCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

purgeProducts(request) → {Promise.<google.longrunning.Operation>}

Calls PurgeProducts.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IPurgeProductsRequest

PurgeProductsRequest message or plain object

Returns:
Type Description
Promise.<google.longrunning.Operation>

Promise

removeProductFromProductSet(request, callback) → {undefined}

Calls RemoveProductFromProductSet.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IRemoveProductFromProductSetRequest

RemoveProductFromProductSetRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.RemoveProductFromProductSetCallback

Node-style callback called with the error, if any, and Empty

Returns:
Type Description
undefined

removeProductFromProductSet(request) → {Promise.<google.protobuf.Empty>}

Calls RemoveProductFromProductSet.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IRemoveProductFromProductSetRequest

RemoveProductFromProductSetRequest message or plain object

Returns:
Type Description
Promise.<google.protobuf.Empty>

Promise

updateProduct(request, callback) → {undefined}

Calls UpdateProduct.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IUpdateProductRequest

UpdateProductRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.UpdateProductCallback

Node-style callback called with the error, if any, and Product

Returns:
Type Description
undefined

updateProduct(request) → {Promise.<google.cloud.vision.v1p4beta1.Product>}

Calls UpdateProduct.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IUpdateProductRequest

UpdateProductRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.vision.v1p4beta1.Product>

Promise

updateProductSet(request, callback) → {undefined}

Calls UpdateProductSet.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IUpdateProductSetRequest

UpdateProductSetRequest message or plain object

callback google.cloud.vision.v1p4beta1.ProductSearch.UpdateProductSetCallback

Node-style callback called with the error, if any, and ProductSet

Returns:
Type Description
undefined

updateProductSet(request) → {Promise.<google.cloud.vision.v1p4beta1.ProductSet>}

Calls UpdateProductSet.

Parameters:
Name Type Description
request google.cloud.vision.v1p4beta1.IUpdateProductSetRequest

UpdateProductSetRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.vision.v1p4beta1.ProductSet>

Promise

(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {ProductSearch}

Creates new ProductSearch service using the specified rpc implementation.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Returns:
Type Description
ProductSearch

RPC service. Useful where requests and/or responses are streamed.

Type Definitions

AddProductToProductSetCallback(error, responseopt)

Callback as used by addProductToProductSet.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

CreateProductCallback(error, responseopt)

Callback as used by createProduct.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.vision.v1p4beta1.Product <optional>

Product

CreateProductSetCallback(error, responseopt)

Callback as used by createProductSet.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.vision.v1p4beta1.ProductSet <optional>

ProductSet

CreateReferenceImageCallback(error, responseopt)

Callback as used by createReferenceImage.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.vision.v1p4beta1.ReferenceImage <optional>

ReferenceImage

DeleteProductCallback(error, responseopt)

Callback as used by deleteProduct.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

DeleteProductSetCallback(error, responseopt)

Callback as used by deleteProductSet.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

DeleteReferenceImageCallback(error, responseopt)

Callback as used by deleteReferenceImage.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

GetProductCallback(error, responseopt)

Callback as used by getProduct.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.vision.v1p4beta1.Product <optional>

Product

GetProductSetCallback(error, responseopt)

Callback as used by getProductSet.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.vision.v1p4beta1.ProductSet <optional>

ProductSet

GetReferenceImageCallback(error, responseopt)

Callback as used by getReferenceImage.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.vision.v1p4beta1.ReferenceImage <optional>

ReferenceImage

ImportProductSetsCallback(error, responseopt)

Callback as used by importProductSets.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

ListProductSetsCallback(error, responseopt)

Callback as used by listProductSets.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.vision.v1p4beta1.ListProductSetsResponse <optional>

ListProductSetsResponse

ListProductsCallback(error, responseopt)

Callback as used by listProducts.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.vision.v1p4beta1.ListProductsResponse <optional>

ListProductsResponse

ListProductsInProductSetCallback(error, responseopt)

Callback as used by listProductsInProductSet.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse <optional>

ListProductsInProductSetResponse

ListReferenceImagesCallback(error, responseopt)

Callback as used by listReferenceImages.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.vision.v1p4beta1.ListReferenceImagesResponse <optional>

ListReferenceImagesResponse

PurgeProductsCallback(error, responseopt)

Callback as used by purgeProducts.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.longrunning.Operation <optional>

Operation

RemoveProductFromProductSetCallback(error, responseopt)

Callback as used by removeProductFromProductSet.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

UpdateProductCallback(error, responseopt)

Callback as used by updateProduct.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.vision.v1p4beta1.Product <optional>

Product

UpdateProductSetCallback(error, responseopt)

Callback as used by updateProductSet.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.vision.v1p4beta1.ProductSet <optional>

ProductSet