Class protos.google.cloud.retail.v2alpha.ProductService (1.1.6)

Represents a ProductService

Inheritance

$protobuf.rpc.Service > protos.google.cloud.retail.v2alpha.ProductService

Package

@google-cloud/retail!

Constructors

(constructor)(rpcImpl, requestDelimited, responseDelimited)

constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);

Constructs a new ProductService service.

Parameters
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Methods

create(rpcImpl, requestDelimited, responseDelimited)

public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ProductService;

Creates new ProductService service using the specified rpc implementation.

Parameters
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Returns
TypeDescription
ProductService

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

createProduct(request, callback)

public createProduct(request: google.cloud.retail.v2alpha.ICreateProductRequest, callback: google.cloud.retail.v2alpha.ProductService.CreateProductCallback): void;

Calls CreateProduct.

Parameters
NameDescription
request google.cloud.retail.v2alpha.ICreateProductRequest

CreateProductRequest message or plain object

callback google.cloud.retail.v2alpha.ProductService.CreateProductCallback

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

Returns
TypeDescription
void

createProduct(request)

public createProduct(request: google.cloud.retail.v2alpha.ICreateProductRequest): Promise<google.cloud.retail.v2alpha.Product>;

Calls CreateProduct.

Parameter
NameDescription
request google.cloud.retail.v2alpha.ICreateProductRequest

CreateProductRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.retail.v2alpha.Product>

Promise

deleteProduct(request, callback)

public deleteProduct(request: google.cloud.retail.v2alpha.IDeleteProductRequest, callback: google.cloud.retail.v2alpha.ProductService.DeleteProductCallback): void;

Calls DeleteProduct.

Parameters
NameDescription
request IDeleteProductRequest

DeleteProductRequest message or plain object

callback google.cloud.retail.v2alpha.ProductService.DeleteProductCallback

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

Returns
TypeDescription
void

deleteProduct(request)

public deleteProduct(request: google.cloud.retail.v2alpha.IDeleteProductRequest): Promise<google.protobuf.Empty>;

Calls DeleteProduct.

Parameter
NameDescription
request IDeleteProductRequest

DeleteProductRequest message or plain object

Returns
TypeDescription
Promise<google.protobuf.Empty>

Promise

getProduct(request, callback)

public getProduct(request: google.cloud.retail.v2alpha.IGetProductRequest, callback: google.cloud.retail.v2alpha.ProductService.GetProductCallback): void;

Calls GetProduct.

Parameters
NameDescription
request IGetProductRequest

GetProductRequest message or plain object

callback google.cloud.retail.v2alpha.ProductService.GetProductCallback

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

Returns
TypeDescription
void

getProduct(request)

public getProduct(request: google.cloud.retail.v2alpha.IGetProductRequest): Promise<google.cloud.retail.v2alpha.Product>;

Calls GetProduct.

Parameter
NameDescription
request IGetProductRequest

GetProductRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.retail.v2alpha.Product>

Promise

importProducts(request, callback)

public importProducts(request: google.cloud.retail.v2alpha.IImportProductsRequest, callback: google.cloud.retail.v2alpha.ProductService.ImportProductsCallback): void;

Calls ImportProducts.

Parameters
NameDescription
request google.cloud.retail.v2alpha.IImportProductsRequest

ImportProductsRequest message or plain object

callback google.cloud.retail.v2alpha.ProductService.ImportProductsCallback

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

Returns
TypeDescription
void

importProducts(request)

public importProducts(request: google.cloud.retail.v2alpha.IImportProductsRequest): Promise<google.longrunning.Operation>;

Calls ImportProducts.

Parameter
NameDescription
request google.cloud.retail.v2alpha.IImportProductsRequest

ImportProductsRequest message or plain object

Returns
TypeDescription
Promise<google.longrunning.Operation>

Promise

updateProduct(request, callback)

public updateProduct(request: google.cloud.retail.v2alpha.IUpdateProductRequest, callback: google.cloud.retail.v2alpha.ProductService.UpdateProductCallback): void;

Calls UpdateProduct.

Parameters
NameDescription
request google.cloud.retail.v2alpha.IUpdateProductRequest

UpdateProductRequest message or plain object

callback google.cloud.retail.v2alpha.ProductService.UpdateProductCallback

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

Returns
TypeDescription
void

updateProduct(request)

public updateProduct(request: google.cloud.retail.v2alpha.IUpdateProductRequest): Promise<google.cloud.retail.v2alpha.Product>;

Calls UpdateProduct.

Parameter
NameDescription
request google.cloud.retail.v2alpha.IUpdateProductRequest

UpdateProductRequest message or plain object

Returns
TypeDescription
Promise<google.cloud.retail.v2alpha.Product>

Promise