async def sample_delete_reference_image(): # Create a client client = vision_v1p4beta1.ProductSearchAsyncClient() # Initialize request argument(s) request = vision_v1p4beta1.DeleteReferenceImageRequest( name="name_value", ) # Make the request await client.delete_reference_image(request=request)
async def sample_get_product_set(): # Create a client client = vision_v1p4beta1.ProductSearchAsyncClient() # Initialize request argument(s) request = vision_v1p4beta1.GetProductSetRequest(name="name_value", ) # Make the request response = await client.get_product_set(request=request) # Handle the response print(response)
async def sample_update_product(): # Create a client client = vision_v1p4beta1.ProductSearchAsyncClient() # Initialize request argument(s) request = vision_v1p4beta1.UpdateProductRequest() # Make the request response = await client.update_product(request=request) # Handle the response print(response)
async def sample_remove_product_from_product_set(): # Create a client client = vision_v1p4beta1.ProductSearchAsyncClient() # Initialize request argument(s) request = vision_v1p4beta1.RemoveProductFromProductSetRequest( name="name_value", product="product_value", ) # Make the request await client.remove_product_from_product_set(request=request)
async def sample_add_product_to_product_set(): # Create a client client = vision_v1p4beta1.ProductSearchAsyncClient() # Initialize request argument(s) request = vision_v1p4beta1.AddProductToProductSetRequest( name="name_value", product="product_value", ) # Make the request await client.add_product_to_product_set(request=request)
async def sample_list_product_sets(): # Create a client client = vision_v1p4beta1.ProductSearchAsyncClient() # Initialize request argument(s) request = vision_v1p4beta1.ListProductSetsRequest(parent="parent_value", ) # Make the request page_result = client.list_product_sets(request=request) # Handle the response async for response in page_result: print(response)
async def sample_purge_products(): # Create a client client = vision_v1p4beta1.ProductSearchAsyncClient() # Initialize request argument(s) request = vision_v1p4beta1.PurgeProductsRequest(parent="parent_value", ) # Make the request operation = client.purge_products(request=request) print("Waiting for operation to complete...") response = await operation.result() # Handle the response print(response)
async def sample_create_reference_image(): # Create a client client = vision_v1p4beta1.ProductSearchAsyncClient() # Initialize request argument(s) reference_image = vision_v1p4beta1.ReferenceImage() reference_image.uri = "uri_value" request = vision_v1p4beta1.CreateReferenceImageRequest( parent="parent_value", reference_image=reference_image, ) # Make the request response = await client.create_reference_image(request=request) # Handle the response print(response)