1 /* 2 * Copyright 2022 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 /** 18 * A client to Cloud Vision API 19 * 20 * <p>The interfaces provided are listed below, along with usage samples. 21 * 22 * <p>======================= ImageAnnotatorClient ======================= 23 * 24 * <p>Service Description: Service that performs Google Cloud Vision API detection tasks over client 25 * images, such as face, landmark, logo, label, and text detection. The ImageAnnotator service 26 * returns detected entities from the images. 27 * 28 * <p>Sample for ImageAnnotatorClient: 29 * 30 * <pre>{@code 31 * // This snippet has been automatically generated and should be regarded as a code template only. 32 * // It will require modifications to work: 33 * // - It may require correct/in-range values for request initialization. 34 * // - It may require specifying regional endpoints when creating the service client as shown in 35 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 36 * try (ImageAnnotatorClient imageAnnotatorClient = ImageAnnotatorClient.create()) { 37 * List<AnnotateImageRequest> requests = new ArrayList<>(); 38 * BatchAnnotateImagesResponse response = imageAnnotatorClient.batchAnnotateImages(requests); 39 * } 40 * }</pre> 41 * 42 * <p>======================= ProductSearchClient ======================= 43 * 44 * <p>Service Description: Manages Products and ProductSets of reference images for use in product 45 * search. It uses the following resource model: 46 * 47 * <p>- The API has a collection of [ProductSet][google.cloud.vision.v1.ProductSet] resources, named 48 * `projects/*/locations/*/productSets/*`, which acts as a way to put different products 49 * into groups to limit identification. 50 * 51 * <p>In parallel, 52 * 53 * <p>- The API has a collection of [Product][google.cloud.vision.v1.Product] resources, named 54 * `projects/*/locations/*/products/*` 55 * 56 * <p>- Each [Product][google.cloud.vision.v1.Product] has a collection of 57 * [ReferenceImage][google.cloud.vision.v1.ReferenceImage] resources, named 58 * `projects/*/locations/*/products/*/referenceImages/*` 59 * 60 * <p>Sample for ProductSearchClient: 61 * 62 * <pre>{@code 63 * // This snippet has been automatically generated and should be regarded as a code template only. 64 * // It will require modifications to work: 65 * // - It may require correct/in-range values for request initialization. 66 * // - It may require specifying regional endpoints when creating the service client as shown in 67 * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library 68 * try (ProductSearchClient productSearchClient = ProductSearchClient.create()) { 69 * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); 70 * ProductSet productSet = ProductSet.newBuilder().build(); 71 * String productSetId = "productSetId1003042158"; 72 * ProductSet response = productSearchClient.createProductSet(parent, productSet, productSetId); 73 * } 74 * }</pre> 75 */ 76 @Generated("by gapic-generator-java") 77 package com.google.cloud.vision.v1; 78 79 import javax.annotation.Generated; 80