async def sample_delete_product_set():
    # Create a client
    client = vision_v1.ProductSearchAsyncClient()

    # Initialize request argument(s)
    request = vision_v1.DeleteProductSetRequest(name="name_value", )

    # Make the request
    await client.delete_product_set(request=request)
Пример #2
0
async def sample_delete_reference_image():
    # Create a client
    client = vision_v1.ProductSearchAsyncClient()

    # Initialize request argument(s)
    request = vision_v1.DeleteReferenceImageRequest(name="name_value", )

    # Make the request
    await client.delete_reference_image(request=request)
Пример #3
0
async def sample_create_product():
    # Create a client
    client = vision_v1.ProductSearchAsyncClient()

    # Initialize request argument(s)
    request = vision_v1.CreateProductRequest(parent="parent_value", )

    # Make the request
    response = await client.create_product(request=request)

    # Handle the response
    print(response)
Пример #4
0
async def sample_update_product_set():
    # Create a client
    client = vision_v1.ProductSearchAsyncClient()

    # Initialize request argument(s)
    request = vision_v1.UpdateProductSetRequest()

    # Make the request
    response = await client.update_product_set(request=request)

    # Handle the response
    print(response)
async def sample_remove_product_from_product_set():
    # Create a client
    client = vision_v1.ProductSearchAsyncClient()

    # Initialize request argument(s)
    request = vision_v1.RemoveProductFromProductSetRequest(
        name="name_value",
        product="product_value",
    )

    # Make the request
    await client.remove_product_from_product_set(request=request)
async def sample_get_product():
    # Create a client
    client = vision_v1.ProductSearchAsyncClient()

    # Initialize request argument(s)
    request = vision_v1.GetProductRequest(name="name_value", )

    # Make the request
    response = await client.get_product(request=request)

    # Handle the response
    print(response)
async def sample_add_product_to_product_set():
    # Create a client
    client = vision_v1.ProductSearchAsyncClient()

    # Initialize request argument(s)
    request = vision_v1.AddProductToProductSetRequest(
        name="name_value",
        product="product_value",
    )

    # Make the request
    await client.add_product_to_product_set(request=request)
Пример #8
0
async def sample_list_products_in_product_set():
    # Create a client
    client = vision_v1.ProductSearchAsyncClient()

    # Initialize request argument(s)
    request = vision_v1.ListProductsInProductSetRequest(name="name_value", )

    # Make the request
    page_result = client.list_products_in_product_set(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
Пример #9
0
async def sample_list_reference_images():
    # Create a client
    client = vision_v1.ProductSearchAsyncClient()

    # Initialize request argument(s)
    request = vision_v1.ListReferenceImagesRequest(parent="parent_value", )

    # Make the request
    page_result = client.list_reference_images(request=request)

    # Handle the response
    async for response in page_result:
        print(response)
async def sample_import_product_sets():
    # Create a client
    client = vision_v1.ProductSearchAsyncClient()

    # Initialize request argument(s)
    request = vision_v1.ImportProductSetsRequest(parent="parent_value", )

    # Make the request
    operation = client.import_product_sets(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_v1.ProductSearchAsyncClient()

    # Initialize request argument(s)
    reference_image = vision_v1.ReferenceImage()
    reference_image.uri = "uri_value"

    request = vision_v1.CreateReferenceImageRequest(
        parent="parent_value",
        reference_image=reference_image,
    )

    # Make the request
    response = await client.create_reference_image(request=request)

    # Handle the response
    print(response)