private async Task <Google.Cloud.Vision.V1.ReferenceImage> CreateReferenceImage(ProductSearchClient client, CreateReferenceImageOptions opts) { var request = new CreateReferenceImageRequest { // Get the full path of the product. ParentAsProductName = new ProductName(opts.ProjectID, opts.ComputeRegion, opts.ProductID), ReferenceImageId = opts.ReferenceImageID, // Create a reference image. ReferenceImage = new Google.Cloud.Vision.V1.ReferenceImage { Uri = opts.ReferenceImageURI } }; var referenceImage = await client.CreateReferenceImageAsync(request); return(referenceImage); }